Changes between Version 34 and Version 35 of TracOnWindowsIisAjp
- Timestamp:
- Feb 2, 2015, 7:16:20 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracOnWindowsIisAjp
v34 v35 1 = Running Trac on IIS 6 using AJP =1 = Running Trac on IIS 6 using AJP 2 2 3 3 Contributed by:[[br]] 4 4 Wilfred Berger, Statistisches Landesamt, Stuttgart, Germany, wilfred.berger[[html(@)]]stala.bwl.de 5 5 6 I did this with:6 Setup: 7 7 * Windows Server 2003 SP2 8 8 * IIS 6 9 9 * Trac 0.11 10 It may work for other versions.11 10 12 It has been reported to work with Trac 0.11.6 on Windows Server 2008.11 Also tested with Trac 0.11.6 on Windows Server 2008, as well as Trac 0.12.2 without any problems or modifications. 13 12 14 In May 2011 I upgraded to Trac 0.12.2 without any problems or modifications. 13 == Why this? 15 14 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: 15 If 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: 19 16 20 17 * tracd does not support HTTPS. If you want to serve HTTPS, you will have to connect Trac to a common web server. … … 27 24 The 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. 28 25 29 == 1. Install Trac == 30 ... exactly as if you were going to run [TracOnWindowsStandalone tracd stand-alone], with two exceptions: 26 == 1. Install Trac 31 27 32 * Since port 80 will be occupied by IIS, choose a different port, adding "`-p 8009`" to the tracd start command. 28 Exactly as if you were going to run [TracOnWindowsStandalone tracd stand-alone], with two exceptions: 33 29 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 32 8009 is the standard port for AJP. Of course, you are free to use any other port. 35 33 36 34 At this point you should check whether Trac is running properly. 37 35 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. 39 37 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.)38 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. 41 39 42 == 2. Install [http://trac.saddi.com/flup flup] ==40 == 2. Install flup 43 41 44 42 * 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). … … 47 45 Now tracd should start without an error. 48 46 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] 50 48 51 49 * Set up the directory structure. … … 55 53 * 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. 56 54 * 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)55 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: 58 56 59 57 {{{ … … 77 75 }}} 78 76 79 * Create the workers.properties file with the following content: (replace the host name and port if necessary) 77 Replace "C:\AJP-Connector" with your actual directory. 78 79 * Create the workers.properties file with the following content: 80 80 81 81 {{{ … … 89 89 }}} 90 90 91 * Create the uriworkermap.properties file with the following content: (replace foo and bar with your trac project names) 91 Replace the host name and port where applicable. 92 93 * Create the uriworkermap.properties file with the following content: 92 94 93 95 {{{ … … 96 98 }}} 97 99 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). 100 Replace 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. 101 105 102 106 The only purpose for this virtual directory is to allow the ISAPI filter defined in step 6 to find the DLL. 103 107 104 == 5. Allow execution of the DLL as Web Service Extension == 108 == 5. Allow execution of the DLL as Web Service Extension 109 105 110 * 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. 108 113 * Set extension status to Allowed. 109 114 * Click OK. 110 115 111 (This step may not be necessary for IIS 5.1 as IIS 6.0 introduced the Web Service Extension) 116 This step may not be necessary for IIS 5.1 as IIS 6.0 introduced the Web Service Extension. 112 117 113 == 6. Add AJP-Connector to the ISAPI filters == 118 == 6. Add AJP-Connector to the ISAPI filters 119 114 120 * In the IIS Manager, open the properties of the web site where you want to publish Trac. 115 121 * Open "ISAPI Filters". 116 122 * 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. 118 124 119 Perhaps you willhave to restart IIS.125 You may have to restart IIS. 120 126 121 == 7. Any further questions? == 127 == 7. Any further questions? 128 122 129 Feel free to send me a mail. My address is given at the top of this page. 123 130 124 == Trouble with Authentication == 131 == Trouble with Authentication 132 125 133 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.