Changes between Version 1 and Version 2 of TracModPython


Ignore:
Timestamp:
06/03/10 15:59:45 (14 years ago)
Author:
zeiss
Comment:

Importing pages from "/var/lib/svn/trac/etsicheck2" using WikiImport plugin.

Legend:

Unmodified
Added
Removed
Modified
  • TracModPython

    v1 v2  
    1313}}} 
    1414 
    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.'' 
    1716On Debian using apt-get 
    1817{{{ 
     
    5857    PythonOption TracEnvParentDir /var/trac/myprojects 
    5958    # For the index of multiple projects 
    60     PythonOption TracEnvIndexTemplate /srv/www/htdocs/trac/project_list_template.html 
     59    PythonOption TracEnvIndexTemplate /srv/www/htdocs/trac/project_list_tepmlate.html 
    6160    # A space delimitted list, with a "," between key and value pairs. 
    6261    PythonOption TracTemplateVars key1,val1 key2,val2 
     
    6564    # See description above         
    6665    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 
    7468}}} 
    7569 
     
    225219}}} 
    226220 
    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). 
     221if you have issues with login try using `<LocationMatch>` instead of `<Location>` 
    230222 
    231223For a virtual host that supports multiple projects replace "`TracEnv`" /var/trac/myproject with "`TracEnvParentDir`" /var/trac/ 
    232224 
    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". 
     225Note: !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". 
    234226 
    235227== Troubleshooting == 
     
    271263 
    272264It 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  
    300265 
    301266=== Win32 Issues === 
     
    376341 
    377342---- 
    378 See also:  TracGuide, TracInstall, [wiki:TracModWSGI ModWSGI], [wiki:TracFastCgi FastCGI], [wiki:TracModPython ModPython], [trac:TracNginxRecipe TracNginxRecipe] 
     343See also TracGuide, TracInstall, TracCgi, TracFastCgi