Changes between Version 1 and Version 2 of TracModPython
- Timestamp:
- 06/03/10 15:59:45 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracModPython
v1 v2 13 13 }}} 14 14 15 ''Note: The exact path to the module depends on how the HTTPD installation is laid out.'' 16 15 ''Note: The exact path to the module depends on how the HTTPD installation is laid out.'' 17 16 On Debian using apt-get 18 17 {{{ … … 58 57 PythonOption TracEnvParentDir /var/trac/myprojects 59 58 # For the index of multiple projects 60 PythonOption TracEnvIndexTemplate /srv/www/htdocs/trac/project_list_te mplate.html59 PythonOption TracEnvIndexTemplate /srv/www/htdocs/trac/project_list_tepmlate.html 61 60 # A space delimitted list, with a "," between key and value pairs. 62 61 PythonOption TracTemplateVars key1,val1 key2,val2 … … 65 64 # See description above 66 65 PythonOption TracUriRoot /projects/myproject 67 }}} 68 69 === Python Egg Cache === 70 71 Compressed python eggs like Genshi are normally extracted into a directory named `.python-eggs` in the users home directory. Since apache's home usually is not writable an alternate egg cache directory can be specified like this: 72 {{{ 73 PythonOption PYTHON_EGG_CACHE /var/trac/myprojects/egg-cache 66 # Override default python egg cache location 67 PythonOption PYTHON_EGG_CACHE /var/trac/myprojects/egg-cache 74 68 }}} 75 69 … … 225 219 }}} 226 220 227 This does not seem to work in all cases. What you can do if it does not: 228 * Try using `<LocationMatch>` instead of `<Location>` 229 * <Location /> may, in your server setup, refer to the complete host instead of simple the root of the server. This means that everything (including the login directory referenced below) will be sent to python and authentication does not work (i.e. you get the infamous Authentication information missing error). If this applies to you, try using a sub-directory for trac instead of the root (i.e. /web/ and /web/login instead of / and /login). 221 if you have issues with login try using `<LocationMatch>` instead of `<Location>` 230 222 231 223 For a virtual host that supports multiple projects replace "`TracEnv`" /var/trac/myproject with "`TracEnvParentDir`" /var/trac/ 232 224 233 Note: !DocumentRoot should not point to your Trac project env. As Asmodai wrote on #trac: "suppose there's a webser ver bug that allows disclosure of !DocumentRoot they could then leech the entire Trac environment".225 Note: !DocumentRoot should not point to your Trac project env. As Asmodai wrote on #trac: "suppose there's a webserer bug that allows disclosure of !DocumentRoot they could then leech the entire Trac environment". 234 226 235 227 == Troubleshooting == … … 271 263 272 264 It may be possible to work around this with mod_rewrite, but I failed to get this working. In all, it is more hassle than it is worth. Stick to the provided instructions. :) 273 274 A success story: For me it worked out-of-box, with following trivial config:275 {{{276 SetHandler mod_python277 PythonInterpreter main_interpreter278 PythonHandler trac.web.modpython_frontend279 PythonOption TracEnv /system/path/to/this/directory280 PythonOption TracUriRoot /path/on/apache281 282 AuthType Basic283 AuthName "ProjectName"284 AuthUserFile /path/to/.htpasswd285 Require valid-user286 }}}287 288 The TracUriRoot is obviously the path you need to enter to the browser to get to the trac (e.g. domain.tld/projects/trac)289 290 === Additional .htaccess help ===291 292 If you are using the .htaccess method you may have additional problems if your trac directory is inheriting .htaccess directives from another. This may also help to add to your .htaccess file:293 294 {{{295 <IfModule mod_rewrite.c>296 RewriteEngine Off297 </IfModule>298 }}}299 300 265 301 266 === Win32 Issues === … … 376 341 377 342 ---- 378 See also : TracGuide, TracInstall, [wiki:TracModWSGI ModWSGI], [wiki:TracFastCgi FastCGI], [wiki:TracModPython ModPython], [trac:TracNginxRecipe TracNginxRecipe]343 See also TracGuide, TracInstall, TracCgi, TracFastCgi