Edgewall Software

Changes between Version 34 and Version 35 of TracOnWindowsIisAjp


Ignore:
Timestamp:
Feb 2, 2015, 7:16:20 PM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracOnWindowsIisAjp

    v34 v35  
    1 = Running Trac on IIS 6 using AJP =
     1= Running Trac on IIS 6 using AJP
    22
    33Contributed by:[[br]]
    44Wilfred Berger, Statistisches Landesamt, Stuttgart, Germany, wilfred.berger[[html(@)]]stala.bwl.de
    55
    6 I did this with:
     6Setup:
    77 * Windows Server 2003 SP2
    88 * IIS 6
    99 * Trac 0.11
    10 It may work for other versions.
    1110
    12 It has been reported to work with Trac 0.11.6 on Windows Server 2008.
     11Also tested with Trac 0.11.6 on Windows Server 2008, as well as Trac 0.12.2 without any problems or modifications.
    1312
    14 In May 2011 I upgraded to Trac 0.12.2 without any problems or modifications.
     13== Why this?
    1514
    16 == Why this? ==
    17 If you want to run Trac on a Windows system, your first choice will be running [TracOnWindowsStandalone tracd stand-alone].[[BR]]
    18 This may be impossible for several reasons:
     15If you want to run Trac on a Windows system, your first choice will be running [TracOnWindowsStandalone tracd stand-alone]. However, this may be impossible for several reasons:
    1916
    2017 * tracd does not support HTTPS. If you want to serve HTTPS, you will have to connect Trac to a common web server.
     
    2724The following solution uses [http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html AJP]. This protocol was developed for connecting Tomcat to a web server which is very similar to what we are doing here.
    2825
    29 == 1. Install Trac ==
    30 ... exactly as if you were going to run [TracOnWindowsStandalone tracd stand-alone], with two exceptions:
     26== 1. Install Trac
    3127
    32  * Since port 80 will be occupied by IIS, choose a different port, adding "`-p 8009`" to the tracd start command.
     28Exactly as if you were going to run [TracOnWindowsStandalone tracd stand-alone], with two exceptions:
    3329
    34 8009 is the standard port for AJP. Of course, you are free to use any other port as well.
     30 * Since port 80 will be occupied by IIS, choose a different port, adding `-p 8009` to the tracd start command.
     31
     328009 is the standard port for AJP. Of course, you are free to use any other port.
    3533
    3634At this point you should check whether Trac is running properly.
    3735
    38  * Add "`--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.
     36 * Add `--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.
    3937
    40 Now you will get an error message indicating that module flup.server.ajp is missing. (If you don't, flup is already installed and you may skip the following step.)
     38Now 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.
    4139
    42 == 2. Install [http://trac.saddi.com/flup flup] ==
     40== 2. Install flup
    4341
    4442 * Copy `flup-1.0-py2.5.egg` from [http://www.saddi.com/software/flup/dist/ Saddi Software binaries] to C:\Python25\Scripts (or whatever may be your Python installation directory).
     
    4745Now tracd should start without an error.
    4846
    49 == 3. Install [http://tomcat.apache.org/connectors-doc/reference/iis.html Tomcat AJP Connector for IIS] ==
     47== 3. Install [http://tomcat.apache.org/connectors-doc/reference/iis.html Tomcat AJP Connector for IIS]
    5048
    5149 * Set up the directory structure.
     
    5553 * Copy `tomcat-connectors-1.2.37-windows-i386-iis.zip` (or `tomcat-connectors-1.2.37-windows-x86_64-iis.zip` 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 `isapi_redirect.dll` to the bin subdirectory.
    5654 * Create a configuration file `isapi_redirect.properties` for the ISAPI redirector.
    57 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)
     55This 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:
    5856
    5957{{{
     
    7775}}}
    7876
    79  * Create the workers.properties file with the following content: (replace the host name and port if necessary)
     77Replace "C:\AJP-Connector" with your actual directory.
     78
     79 * Create the workers.properties file with the following content:
    8080
    8181{{{
     
    8989}}}
    9090
    91  * Create the uriworkermap.properties file with the following content: (replace foo and bar with your trac project names)
     91Replace the host name and port where applicable.
     92
     93 * Create the uriworkermap.properties file with the following content:
    9294
    9395{{{
     
    9698}}}
    9799
    98 == 4. Define the virtual directory for AJP-Connector ==
    99  * Start the IIS Manager (normally found at %!SystemRoot%\system32\inetsrv\iis.msc).
    100  * 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).
     100Replace foo and bar with your Trac project names.
     101
     102== 4. Define the virtual directory for AJP-Connector
     103 * Start the IIS Manager, normally found at %!SystemRoot%\system32\inetsrv\iis.msc.
     104 * 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.
    101105 
    102106The only purpose for this virtual directory is to allow the ISAPI filter defined in step 6 to find the DLL.
    103107
    104 == 5. Allow execution of the DLL as Web Service Extension ==
     108== 5. Allow execution of the DLL as Web Service Extension
     109
    105110 * In the IIS Manager, open Web Service Extensions.
    106  * Define a new Web Service Extension called AJP-Connector (or whatever you want).
    107  * Add C:\AJP-Connector\bin\isapi_redirect.dll to the required files (replace "C:\AJP-Connector" with your actual directory).
     111 * Define a new Web Service Extension called AJP-Connector, or whatever name you choose.
     112 * Add C:\AJP-Connector\bin\isapi_redirect.dll to the required files and replace "C:\AJP-Connector" with your actual directory.
    108113 * Set extension status to Allowed.
    109114 * Click OK.
    110115
    111 (This step may not be necessary for IIS 5.1 as IIS 6.0 introduced the Web Service Extension)
     116This step may not be necessary for IIS 5.1 as IIS 6.0 introduced the Web Service Extension.
    112117
    113 == 6. Add AJP-Connector to the ISAPI filters ==
     118== 6. Add AJP-Connector to the ISAPI filters
     119
    114120 * In the IIS Manager, open the properties of the web site where you want to publish Trac.
    115121 * Open "ISAPI Filters".
    116122 * Add a new filter with any filter name (I prefer "AJP-Connector") and the complete path to isapi_redirect-1.2.28.dll as executable.
    117  * Close the two property windows (clicking OK in each of them).
     123 * Close the two property windows, clicking OK in each of them.
    118124
    119 Perhaps you will have to restart IIS.
     125You may have to restart IIS.
    120126
    121 == 7. Any further questions? ==
     127== 7. Any further questions?
     128
    122129Feel free to send me a mail. My address is given at the top of this page.
    123130
    124 == Trouble with Authentication ==
     131== Trouble with Authentication
     132
    125133I 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.