| 28 | |
| 29 | == Setting up a project on the root of the webserver == |
| 30 | |
| 31 | To install Trac on the root of the webserver (in a virtual host context for example) and make it available at ''!http://some-hostname/'' URL, use the following: |
| 32 | |
| 33 | {{{ |
| 34 | <LocationMatch "^/(?!trac/)"> |
| 35 | SetHandler mod_python |
| 36 | PythonHandler trac.ModPythonHandler |
| 37 | PythonOption TracUriRoot "/" |
| 38 | PythonOption TracEnv /var/trac/myproject |
| 39 | </LocationMatch> |
| 40 | }}} |
| 41 | |
| 42 | The regular expression used in the !LocationMatch directive permits clients to escape mod_python and access Trac "real" files (located at {{{/var/www/some-hostname/htdocs/trac/}}} on the filesystem). Any other URLs will be handled by mod_python. |