httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Jones <>
Subject [users@httpd] location match order
Date Tue, 20 Oct 2009 17:07:33 GMT
I asked about this awhile ago but did not receive a response. My end
goal is to run trac ( at the server root,
while still having other static content or web apps on subdirectories.
should display trac
should display static content

As an intermediate step, I setup trac in its own subdirectory (using
<Location /trac> )
and it works fine, as do the other subdirectories.

However, once I modify the config files so that trac uses <Location
/>, then any other address is passed directly to the trac handler. For
example, shows the trac page with an
error stating "no handler matched request /static/" It appears that
the location directive '/' is matched before the alias '/static' so
everything after the slash is merely passed to the trac handler.

Is it possible to do this? If so, how do I configure Apache for this?
My current config file is below.
thanks for any suggestions,

<IfModule mod_ssl.c>
<VirtualHost *:443 >
	Alias /static /var/www/
	<Directory /var/www/>
		allow from all

	DocumentRoot /home/tracroot/htdocs
	<Directory />
		Options FollowSymLinks
		AllowOverride None

	<Directory /home/tracroot/htdocs/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all

	ErrorLog /var/log/apache2/error.log
	LogLevel warn

	CustomLog /var/log/apache2/ssl_access.log combined

	SSLEngine on
	SSLCertificateFile    /etc/ca/
	SSLCertificateKeyFile /etc/ca/

	BrowserMatch ".*MSIE.*" \
		nokeepalive ssl-unclean-shutdown \
		downgrade-1.0 force-response-1.0
	<Location />
		AuthType Basic
		AuthName "intranet: Enter your username and password"
		AuthUserFile /etc/subversion-htpasswd
		Require valid-user

		SetHandler mod_python
		PythonHandler trac.web.modpython_frontend
		PythonInterpreter main
		PythonOption TracEnv /home/tracroot
		PythonOption TracUriRoot /

	<Location "/login">
		AuthType Basic
		AuthName "intranet: Enter your username and password"
		AuthUserFile /etc/subversion-htpasswd
		Require valid-user


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message