Editing
Trac Installation on Windows Server 2008
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Running Trac on IIS == * See [http://trac.edgewall.org/wiki/TracOnWindowsIisAjp Running Trac on IIS 6 Using AJP]<br />(This also works with IIS 7.) === Install Trac === * Download and install Trac. ** [http://trac.edgewall.org/wiki/TracDownload Trac Download] > '''Windows Installer''' (.exe) ** Or Google "Trac Windows" and from there follow the "download" links. * Install Genshi<br /><syntaxhighlight lang="bash"> $ pip install genshi </syntaxhighlight> * Instead of using port 8000, use 8009 which is the standard port for AJP. * Add <code>--protocol=ajp</code> to have tracd use AJP instead of HTTP.<br /><syntaxhighlight lang="bash"> $ tracd --port 8009 --protocol=ajp ./littledamien_web/trac </syntaxhighlight> * This will result in an error indicating that the module flup.server.ajp is missing. If not, flup is installed and the next step may be skipped. === Install flup === * Try installing using `pip`<br /><syntaxhighlight lang="bash"> $ pip install flup </syntaxhighlight> That `pip` command should be all that's required. Following are the original instructions for posterity. They should be unnecessary and superseded by the above instructions. * Copy `flup-1.0-py2.5.egg` from [http://www.saddi.com/software/flup/dist/ βSaddi Software binaries] to `C:\Python27\Scripts` (or whatever may be your Python installation directory). * Install with `easy_install`<br /><syntaxhighlight lang="bash"> $ easy_install flup </syntaxhighlight> === Install Tomcat AJP Connector for II S=== * Set up the directory structure. 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. * Copy <code>tomcat-connectors-1.2.37-windows-i386-iis.zip</code> (or <code>tomcat-connectors-1.2.37-windows-x86_64-iis.zip</code> in a 64 bit environment) or a newer version from β[http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/windows/ Apache binaries] and extract <code>isapi_redirect.dll</code> to the bin subdirectory. * Create a configuration file <code>isapi_redirect.properties</code> 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: (be sure to replace "C:\AJP-Connector" with your actual directory) <pre> # 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 privileges extension_uri=/AJP-Connector/isapi_redirect.dll # Full path to the log file for the ISAPI Redirector log_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 file worker_file=C:\AJP-Connector\conf\workers.properties # Full path to the uriworkermap.properties file worker_mount_file=C:\AJP-Connector\conf\uriworkermap.properties </pre> * Create the workers.properties file with the following content: (replace the host name and port if necessary) <pre> # Define 1 real worker worker.list=trac # Set properties for trac (ajp13) worker.trac.type=ajp13 worker.trac.host=localhost worker.trac.port=8009 worker.trac.socket_keepalive=0 </pre> * Create the uriworkermap.properties file with the following content: (replace foo and bar with your trac project names) <pre> /foo*=trac /bar*=trac </pre> ===Define the virtual directory for AJP-Connector=== * Start IIS Manager * Inside the web site where you want to publish Trac, define a virtual directory named AJP-Connector, pointing to your bin subdirectory, with permissions to execute executables (not only scripts). ** Click the name of the virtual directory. ** In the virtual directory '''Home''' area, double click '''Handler Mappings'''. ** In the '''Actions''' pane, click '''Edit Feature Permissions'''. ** In the '''Edit Feature Permissions''' dialog verify that the '''Read''' and '''Script''' check boxes are both selected, and that the '''Execute''' check box is also selected. The only purpose for this virtual directory is to allow the ISAPI filter defined in step 6 to find the DLL. ===Allow execution of the DLL as Web Service Extension=== * Open IIS manager * Click on the Computer name in the left pane (root node in the tree) * In the '''Features''' view select '''ISAPI and CGI Restrictions'''. * Under '''Actions''' in the right column click '''Add...''' ** ISAPI or CGI path: path to AJP DLL. (<code>c:\AJP-Connector\bin\isapi_redirect.dll</code>) ** Description: AJP-Connector ** Allow extension path to execute: checked ===Add AJP-Connector to the ISAPI filters=== * In the IIS Manager, open the properties of the web site where you want to publish Trac. * Open '''ISAPI Filters'''. * Add a new filter with any filter name (I prefer "AJP-Connector") and the complete path to c:\AJP-Connector/bin/isapi_redirect.dll as executable.
Summary:
Please note that all contributions to Littledamien Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Littledamien Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information