| 56 | |
| 57 | How can I create a nice URL to access trac.cgi? |
| 58 | ----------------------------------------------- |
| 59 | |
| 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 | directives is the same one that the end-user would see. With this |
| 64 | example, you would also need to change the `TracIni`:trac: file to find |
| 65 | static files at a location other than /trac. |
| 66 | |
| 67 | |
| 68 | :: |
| 69 | |
| 70 | # translates /trac to /cgi-bin/trac.cgi |
| 71 | ScriptAliasMatch ^/trac(.*) "C:/Program Files/Apache Group/Apache2/cgi-bin/trac.cgi$1" |
| 72 | |
| 73 | # sets up environment for Trac |
| 74 | <Location "/trac"> |
| 75 | # For 0.7 release |
| 76 | SetEnv TRAC_ENV "C:/Subversion/trac/CogTool.db" |
| 77 | </Location> |
| 78 | |
| 79 | # authentication |
| 80 | <Location "/trac/login"> |
| 81 | AuthType Basic |
| 82 | AuthName "CogTool Project Trac" |
| 83 | AuthUserFile C:/Subversion/Repo/svn-users |
| 84 | Require valid-user |
| 85 | </Location> |
| 86 | |
| 87 | # static files used to display images and templates |
| 88 | # you will need to change the conf/trac.ini file to point to /trac-docs instead of /trac |
| 89 | Alias /trac-docs "C:/Subversion/trac/htdocs" |
| 90 | <Directory "C:/Subversion/trac/htdocs"> |
| 91 | Options Indexes MultiViews |
| 92 | AllowOverride None |
| 93 | Order allow,deny |
| 94 | Allow from all |
| 95 | </Directory> |
| 96 | |