60 | | If you are serving Trac with Apache 2, you can use directives of the |
61 | | following form to translate the url "http://myserver.com/trac" to |
62 | | "$APACHE_PATH$/cgi-bin/trac.cgi". Note the URL in the Location |
63 | | |
64 | | directives is the same one that the end-user would see. With this |
65 | | example, you would also need to change the `TracIni`:trac: file to find |
66 | | static files at a location other than /trac. |
67 | | |
68 | | |
69 | | :: |
70 | | |
71 | | # translates /trac to /cgi-bin/trac.cgi |
72 | | ScriptAliasMatch ^/trac(.*) "C:/Program Files/Apache Group/Apache2/cgi-bin/trac.cgi$1" |
73 | | |
74 | | # sets up environment for Trac |
75 | | <Location "/trac"> |
76 | | # For 0.7 release |
| 60 | If you are serving Trac with Apache, you can use the following directives |
| 61 | to let your users access Trac with URLs like "http://www.example.com/trac/" rather |
| 62 | than the default "http://www.example.com/cgi-bin/trac.cgi". |
| 63 | This example shows how to set it up for Apache 2 on a Windows |
| 64 | server, but it works just as well with Apache 1.3 or on Unix. |
| 65 | |
| 66 | :: |
| 67 | |
| 68 | # Map the Trac CGI into /trac/ |
| 69 | ScriptAliasMatch ^/trac/(.*) "C:/Program Files/Apache Group/Apache2/cgi-bin/trac.cgi/$1" |
| 70 | |
| 71 | # Fix users who don't type the trailing slash |
| 72 | RedirectMatch ^/trac$ /trac/ |
| 73 | |
| 74 | # Tell Trac where its environment is stored |
| 75 | <Location "/trac/"> |