| 214 | ===Login Not Working=== |
| 215 | If you've used <Location /> directive, it will override any other directives, as well as <Location /Login>. |
| 216 | The 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 | |