Opened 18 years ago
Closed 17 years ago
#3678 closed defect (worksforme)
LocationMatch rule example from installation docs doesn't work
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I configured authentication using the LocationMatch rule for my Apache config based on the example on this page
http://trac.edgewall.org/wiki/TracCgi
The rule which I added was:
<LocationMatch "/projects/[^/]+/login"> AuthType Basic AuthName "Trac" AuthUserFile /usr0/wwwsrv/trac-projects/trac.htpasswd Require valid-user </LocationMatch>
When I attempted to log into my project, my browser kept rejecting my password.
When I added the following rule to my httpd.conf in front of the LocationMatch rule, I was able to log in:
<Location "/projects/marmite/login"> AuthType Basic AuthName "Trac" AuthUserFile /usr0/wwwsrv/trac-projects/trac.htpasswd Require valid-user </Location>
I guess I'll have to add a rule for each project into for now.
Attachments (0)
Change History (5)
comment:1 by , 18 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
follow-up: 3 comment:2 by , 17 years ago
I have kind of same problem, If i use the servername/trac/project/login (with locationmatch) works but it doesnt work with trac as vhost :/
comment:3 by , 17 years ago
This (without Virtual Hosts) works:
<Location /trac> SetHandler mod_python PythonInterpreter main_interpreter PythonHandler trac.web.modpython_frontend PythonOption TracEnvParentDir /srv/trac/ PythonOption TracUriRoot /trac/ php_admin_flag engine off </Location> <LocationMatch "/trac/[^/]+/login"> AuthType Basic AuthName "Trac" AuthUserFile /srv/trac/.htpasswd Require valid-user php_admin_flag engine off </LocationMatch>
But this (with Virtual Hosts) doesn't work:
<VirtualHost *:80> ServerName trac.localhost DocumentRoot /srv/trac <Location /> SetHandler mod_python PythonInterpreter main_interpreter PythonHandler trac.web.modpython_frontend PythonOption TracEnvParentDir /srv/trac/ PythonOption TracUriRoot / php_admin_flag engine off Order allow,deny Allow from all </Location> <LocationMatch "/[^/]+/login"> AuthType Basic AuthName "Trac" AuthUserFile /srv/trac/.htpasswd Require valid-user php_admin_flag engine off Order allow,deny Allow from all </LocationMatch> </VirtualHost>
I can access the pages fine but I don't get a login window shown when i access the login page.
Trac Error Authentication information not available. Please refer to the installation documentation. TracGuide — The Trac User and Administration Guide
Is there a Workarround? I didn't find smth on Wiki :/
comment:4 by , 17 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
comment:5 by , 17 years ago
Priority: | low → normal |
---|---|
Resolution: | → worksforme |
Status: | reopened → closed |
Version: | 0.10b1 |
If you have an installation issue, ask on the MailingList or IrcChannel.
I use that
<LocationMatch>
rule on my local setup, so it does work. Please ask on the MailingList if you'd like some help setting it up.