Sebastien ...
I've got a similar setup to what you want (but with TRAC installed under
/usr/share/trac), and here's my Apache config:
# Virtual host Projects
<VirtualHost *:80>
ServerName projects.examples.com
ServerAdmin [EMAIL PROTECTED]
# Set the DocumentRoot for TRAC
DocumentRoot /usr/share/trac/htdocs
# Configure TRAC as root application, automatically identify
valid projects
<Location "/">
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracUriRoot "/"
PythonOption TracEnvParentDir "/usr/share/trac/projects"
SetEnv PYTHON_EGG_CACHE /usr/share/trac/plugins
</Location>
# Configure authentication for TRAC
<LocationMatch "/[^/]+/login">
AuthType Basic
AuthName "trac"
AuthUserFile /usr/share/trac/users
Require valid-user
</LocationMatch>
# Configure basic resources for TRAC
Alias /trac /usr/share/trac/htdocs
Alias /css /usr/share/trac/htdocs/css
<Location /trac>
SetHandler None
</Location>
# Configure Subversion access
<Location /svn>
DAV svn
SVNParentPath /data/svn
# Limit write permission to list of valid users.
<LimitExcept GET PROPFIND OPTIONS REPORT>
AuthType Basic
AuthName "Subversion"
AuthUserFile /usr/share/trac/users
Require valid-user
</LimitExcept>
</Location>
</VirtualHost>
Comparing your setup and mine, I'd say the problem lies in the way
you've configured the authorization for /svn and /login, and as
Marc-Antoine suggested, you need to use a LocationMatch for /login to
support multiple projects. You don't need to put everything under /trac
to get everything to work; Apache will match the best pattern from each
Location section. You could copy my setup as long as you translated
"/usr/share/trac" to "/var/trac" and "/usr/share/trac/users" to
"/etc/apache2/dav_svn.passwd". You'll need to keep your PythonPath line
if you don't install the Trac modules into the Python libs, and you'll
want to have the "SetEnv PYTHON_EGG_CACHE" line if you install any Trac
extensions.
Note that if you do this, you'll need to have a SetHandler set for any
other locations you choose to add, otherwise you'll inherit the
mod_python handler from the root. This is the cost of using Trac as the
root application for the virtual server.
- Craig -
sarbogast wrote:
I've just set up Trac 0.9.3 on an Ubuntu 6.0.6 server in order to run
multiple projects. Everything works fine until I try to login, and I
get the following Python traceback:
Traceback (most recent call last):
File
"/usr/lib/python2.4/site-packages/trac/web/modpython_frontend.py", line
206, in handler
dispatch_request(mpr.path_info, mpr, env)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 139,
in dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 107,
in dispatch
resp = chosen_handler.process_request(req)
File "/usr/lib/python2.4/site-packages/trac/web/auth.py", line 82, in
process_request
self._do_login(req)
File "/usr/lib/python2.4/site-packages/trac/web/auth.py", line 103,
in _do_login
assert req.remote_user, 'Authentication information not available.'
AssertionError: Authentication information not available.
I know that this kind of error has been reported several times in
Trac's issue tracker but the solution seemed to be different everytime
and none seemed to fit my configuration.
Here is my virtual host configuration:
<VirtualHost *:80>
ServerAdmin [EMAIL PROTECTED]
ServerName trac.epseelon.org
DocumentRoot /var/trac/
<Location />
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /var/trac/
PythonOption TracUriRoot /
PythonPath "sys.path + ['/var/trac/']"
</Location>
ErrorLog /var/log/apache2/error.trac.epseelon.org.log
CustomLog /var/log/apache2/access.trac.epseelon.org.log combined
<Location /svn>
Order allow,deny
Allow from all
DAV svn
SVNParentPath /var/svn
Satisfy Any
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
AuthType Basic
AuthName "The Epseelon Project Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
</Location>
<Location /login>
AuthType Basic
AuthName "Trac login"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
</Location>
</VirtualHost>
I'm almost certain there's something wrong in that virtual host because
I tinkered with it based on a one-project configuration.
Does anyone know what's wrong?
Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---