Re: [Trac] Trac as a windows service

Jun Omae <[email protected]> Tue, 23 Apr 2024 23:22:14 +0900
Newsgroups gmane.comp.version-control.subversion.trac.general
Message-ID <CAEVLMaiXe_sB7DcEHmMP44wjH3E1NzS1xmuoj265SpoxF3uJig@mail.gmail.com>
> If you are not using IIS, you will need to write python code to replace tracd.

No need to write any Python code.

Example for web.config to serve http://localhost/trac
====
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="httpPlatformHandler" path="*" verb="*"
modules="httpPlatformHandler" resourceType="Unspecified" />
    </handlers>
    <httpPlatform
        processPath="<your-venv>\Scripts\tracd.exe"
        arguments="-s --port=%HTTP_PLATFORM_PORT%
--basic-auth=*,<your-htpasswd-file>,Trac --base-path=/trac
<your-tracenv>"
        stdoutLogEnabled="false"
        startupTimeLimit="60"
        processesPerApplication="4"
      >
      <environmentVariables>
      </environmentVariables>
    </httpPlatform>
  </system.webServer>
</configuration>
====

On Tue, Apr 23, 2024 at 10:37 PM jiho lee <[email protected]> wrote:
>
> If you are not using IIS, you will need to write python code to replace tracd.
>
> I've included documentation to help you with this in the previous link.
>
> 2024년 4월 23일 (화) 오후 10:34, Jamie <[email protected]>님이 작성:
>>
>> Ah ok, Thank you. I'll look into that.
>>
>> On Tuesday, April 23, 2024 at 1:13:48 PM UTC+1 Jun Omae wrote:
>>>
>>> I do not recommend using tracd.exe as a Windows service, however you could use IIS with
>>> HttpPlatformHandler to serve Trac.
>>>
>>> See
>>> https://learn.microsoft.com/en-us/visualstudio/python/configure-web-apps-for-iis-windows
>>>
>>> --
>>> Jun Omae <[email protected]> (大前 潤)
>>>
>>>
>>> On Tue, Apr 23, 2024 at 1:53 Jamie <[email protected]> wrote:
>>>>
>>>> Hi all,
>>>> Does anyone have experience with running trac as a windows service?
>>>>
>>>> I've tried various methods including the python script provided in trac hacks, .bat files etc.
>>>>
>>>> The issue I hit is that it starts trac ok, but stopping it stops the service but tracd keeps running in the background thus trac doesn't stop.
>>>>
>>>> Any thoughts on how to fix this or working examples would be appreciated. Just need a way to ensure trac starts and stops as a service rather than just using cmd. Stand alone server btw.
>>>>
>>>> --
>>>>
>>>> You received this message because you are subscribed to the Google Groups "Trac Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+...-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
>>>> To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/8842658a-5f35-44f7-a9c3-992ef60797ebn%40googlegroups.com.
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Trac Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
>> To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/d7007145-03a3-4813-ae5b-0c616f4e75d1n%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups "Trac Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
> To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAPCiUfx6JB%2BqMrMswFy-yVhMG7ruuVKWFxcuA3dYSBtNyjxPtA%40mail.gmail.com.



-- 
Jun Omae <[email protected]> (大前 潤)

-- 
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMaiXe_sB7DcEHmMP44wjH3E1NzS1xmuoj265SpoxF3uJig%40mail.gmail.com.