Contributed by:
Wilfred Berger, Statistisches Landesamt, Stuttgart, Germany, wilfred.berger@stala.bwl.de
Setup:
Also tested with Trac 0.11.6 on Windows Server 2008, as well as Trac 0.12.2 without any problems or modifications.
If you want to run Trac on a Windows system, your first choice will be runningtracd stand-alone. However, this may be impossible for several reasons:
In both cases, the web server on a Windows system will most probably be IIS.
Generally, it is not a good idea to use CGI on a Windows system. CGI implies starting a new system process for every single request, which, on Windows, causes significant overhead and makes things slow.
The following solution usesAJP. This protocol was developed for connecting Tomcat to a web server which is very similar to what we are doing here.
Exactly as if you were going to runtracd stand-alone, with two exceptions:
-p 8009
to the tracd start command.8009 is the standard port for AJP. Of course, you are free to use any other port.
At this point you should check whether Trac is running properly.
--protocol=ajp
to the tracd start command to make tracd use AJP instead of HTTP. You may also add--unquote
if you have problems browsing repositories with spaces in filenames.Now you may get an error message indicating that module flup.server.ajp is missing. If you don't get this message, flup is already installed and you may skip the following step.
flup-1.0-py2.5.egg
fromSaddi Software binaries to C:\Python25\Scripts (or whatever may be your Python installation directory).easy_install flup
.Now tracd should start without an error.
We assume there will be a base directory named C:\AJP-Connector and three subdirectories bin, conf and logs. Of course, you may choose anything else for the base directory.
tomcat-connectors-1.2.37-windows-i386-iis.zip
(ortomcat-connectors-1.2.37-windows-x86_64-iis.zip
in a 64 bit environment) or a newer version fromApache binaries and extractisapi_redirect.dll
to the bin subdirectory.isapi_redirect.properties
for the ISAPI redirector.This must be in the same directory as the DLL and have exactly the same name but with a .properties extension. The configuration file should contain this:
# Configuration file for the ISAPI Redirector# The path to the ISAPI Redirector Extension, relative to the website# This must be in a virtual directory with execute privilegesextension_uri=/AJP-Connector/isapi_redirect.dll# Full path to the log file for the ISAPI Redirectorlog_file=C:\AJP-Connector\logs\isapi_redirect.log# Log level (debug, info, warn, error or trace)log_level=info# Full path to the workers.properties fileworker_file=C:\AJP-Connector\conf\workers.properties# Full path to the uriworkermap.properties fileworker_mount_file=C:\AJP-Connector\conf\uriworkermap.properties
Replace "C:\AJP-Connector" with your actual directory.
# Define 1 real workerworker.list=trac# Set properties for trac (ajp13)worker.trac.type=ajp13worker.trac.host=localhostworker.trac.port=8009worker.trac.socket_keepalive=0
Replace the host name and port where applicable.
/foo*=trac/bar*=trac
Replace foo and bar with your Trac project names.
The only purpose for this virtual directory is to allow the ISAPI filter defined in step 6 to find the DLL.
This step may not be necessary for IIS 5.1 as IIS 6.0 introduced the Web Service Extension.
You may have to restart IIS.
Feel free to send me a mail. My address is given at the top of this page.
I had some trouble with authentication. If tracd uses Digest Authentication it does not support Basic Authentication. But if Basic Authentication is enabled in IIS, it sends an additional Basic Authentication HTTP header. Some browsers (including Firefox) try to use Basic Authentication if both Basic and Digest Authentication headers are sent by the server. tracd can not handle this information and will resend the authentication request. So be sure to turn off Basic Authentication on IIS.
Powered byTrac 1.4.3
ByEdgewall Software.
Visit the Trac open source project at
https://trac.edgewall.org/
Copyright © 2003-2024 Edgewall Software. All rights reserved.