Changes between Version 2 and Version 3 of TracModPython


Ignore:
Timestamp:
11/26/08 05:26:10 (9 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracModPython

    v2 v3  
    1313}}} 
    1414 
    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 
    1617On Debian using apt-get 
    1718{{{ 
     
    5758    PythonOption TracEnvParentDir /var/trac/myprojects 
    5859    # For the index of multiple projects 
    59     PythonOption TracEnvIndexTemplate /srv/www/htdocs/trac/project_list_tepmlate.html 
     60    PythonOption TracEnvIndexTemplate /srv/www/htdocs/trac/project_list_template.html 
    6061    # A space delimitted list, with a "," between key and value pairs. 
    6162    PythonOption TracTemplateVars key1,val1 key2,val2 
     
    6465    # See description above         
    6566    PythonOption TracUriRoot /projects/myproject 
    66     # Override default python egg cache location 
    67     PythonOption PYTHON_EGG_CACHE /var/trac/myprojects/egg-cache 
     67}}} 
     68 
     69=== Python Egg Cache === 
     70 
     71Compressed 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{{{ 
     73PythonOption PYTHON_EGG_CACHE /var/trac/myprojects/egg-cache 
    6874}}} 
    6975 
     
    219225}}} 
    220226 
    221 if you have issues with login try using `<LocationMatch>` instead of `<Location>` 
     227This 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). 
    222230 
    223231For a virtual host that supports multiple projects replace "`TracEnv`" /var/trac/myproject with "`TracEnvParentDir`" /var/trac/ 
    224232 
    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". 
     233Note: !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". 
    226234 
    227235== Troubleshooting == 
     
    263271 
    264272It 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 
     274A success story: For me it worked out-of-box, with following trivial config: 
     275{{{ 
     276SetHandler mod_python 
     277PythonInterpreter main_interpreter 
     278PythonHandler trac.web.modpython_frontend  
     279PythonOption TracEnv /system/path/to/this/directory 
     280PythonOption TracUriRoot /path/on/apache 
     281 
     282AuthType Basic 
     283AuthName "ProjectName" 
     284AuthUserFile /path/to/.htpasswd 
     285Require valid-user 
     286}}} 
     287 
     288The TracUriRoot is obviously the path you need to enter to the browser to get to the trac (e.g. domain.tld/projects/trac) 
    265289 
    266290=== Win32 Issues ===