Edgewall Software
Modify

Opened 18 years ago

Closed 17 years ago

#3678 closed defect (worksforme)

LocationMatch rule example from installation docs doesn't work

Reported by: jeffwong@… 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 Matthew Good, 18 years ago

Resolution: worksforme
Status: newclosed

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.

comment:2 by anonymous, 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 :/

in reply to:  2 comment:3 by anonymous, 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 anonymous, 17 years ago

Resolution: worksforme
Status: closedreopened

comment:5 by Noah Kantrowitz, 17 years ago

Priority: lownormal
Resolution: worksforme
Status: reopenedclosed
Version: 0.10b1

If you have an installation issue, ask on the MailingList or IrcChannel.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.