Edgewall Software

Changes between Version 162 and Version 163 of TracModPython


Ignore:
Timestamp:
Sep 23, 2011, 3:51:20 PM (13 years ago)
Author:
trac@…
Comment:

workaround for login not working on root URL for multi project setups

Legend:

Unmodified
Added
Removed
Modified
  • TracModPython

    v162 v163  
    212212For multiple projects, try restarting the server as well.
    213213
     214===Login Not Working===
     215If you've used <Location /> directive, it will override any other directives, as well as <Location /Login>.
     216The workaround is to use negation expression as follows (for multi project setups):
     217{{{
     218#!xml
     219#this one for other pages
     220<Location ~ "/*(?!login)">
     221   SetHandler mod_python
     222   PythonHandler trac.web.modpython_frontend
     223   PythonOption TracEnvParentDir /projects
     224   PythonOption TracUriRoot /
     225
     226</Location>
     227#this one for login page
     228<Location ~ "/[^/]+/login">
     229   SetHandler mod_python
     230   PythonHandler trac.web.modpython_frontend
     231   PythonOption TracEnvParentDir /projects
     232   PythonOption TracUriRoot /
     233
     234   #remove these if you don't want to force SSL
     235   RewriteEngine On
     236   RewriteCond %{HTTPS} off
     237   RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
     238
     239   AuthType Basic
     240   AuthName "Trac"
     241   AuthUserFile /projects/.htpasswd
     242   Require valid-user
     243</Location>
     244}}}
     245
    214246=== Expat-related segmentation faults === #expat
    215247