Changes between Version 1 and Version 2 of TracModPython
- Timestamp:
- Dec 7, 2010, 10:14:17 PM (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.'' 15 ''Note: The exact path to the module depends on how the HTTPD installation is laid out.'' 16 16 17 On Debian using apt-get 17 18 {{{ … … 57 58 PythonOption TracEnvParentDir /var/trac/myprojects 58 59 # For the index of multiple projects 59 PythonOption TracEnvIndexTemplate /srv/www/htdocs/trac/project_list_te pmlate.html60 PythonOption TracEnvIndexTemplate /srv/www/htdocs/trac/project_list_template.html 60 61 # A space delimitted list, with a "," between key and value pairs. 61 62 PythonOption TracTemplateVars key1,val1 key2,val2 … … 64 65 # See description above 65 66 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 74 }}} 67 75 … … 217 225 }}} 218 226 219 if you have issues with login try using `<LocationMatch>` instead of `<Location>` 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). 220 230 221 231 For a virtual host that supports multiple projects replace "`TracEnv`" /var/trac/myproject with "`TracEnvParentDir`" /var/trac/ 222 232 223 Note: !DocumentRoot should not point to your Trac project env. As Asmodai wrote on #trac: "suppose there's a webser er bug that allows disclosure of !DocumentRoot they could then leech the entire Trac environment".233 Note: !DocumentRoot should not point to your Trac project env. As Asmodai wrote on #trac: "suppose there's a webserver bug that allows disclosure of !DocumentRoot they could then leech the entire Trac environment". 224 234 225 235 == Troubleshooting == … … 261 271 262 272 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_python 277 PythonInterpreter main_interpreter 278 PythonHandler trac.web.modpython_frontend 279 PythonOption TracEnv /system/path/to/this/directory 280 PythonOption TracUriRoot /path/on/apache 281 282 AuthType Basic 283 AuthName "ProjectName" 284 AuthUserFile /path/to/.htpasswd 285 Require valid-user 286 }}} 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 Off 297 </IfModule> 298 }}} 299 263 300 264 301 === Win32 Issues === … … 339 376 340 377 ---- 341 See also TracGuide, TracInstall, TracCgi, TracFastCgi378 See also: TracGuide, TracInstall, [wiki:TracModWSGI ModWSGI], [wiki:TracFastCgi FastCGI], [wiki:TracModPython ModPython], [trac:TracNginxRecipe TracNginxRecipe]