Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Mostly through trial and error I have created the Apache configuration file below.

It aims to allow a server on localhost:8002 and a trac server via WSGI to share an LDAP server and appear to be on the same domain/port.

The rules work in isolation, but not in parallel.

In particular, trac WSGI will only serve correctly if ProxyPass/ProxyPassReverse lines are commented out. Without that redirect the server at localhost:8002 obviously isn't mapped to the outgoing 8022 port.

I assume the mix of Directory, Proxy and Location rules is the route of my problem - or perhaps the order of them?

WSGIDaemonProcess trac stack-size=524288 python-path=/usr/lib/python2.5/site-packages
WSGIScriptAlias /trac /home/web/foo/parts/trac/tracwsgi/cgi-bin/trac.wsgi


    ProxyRequests Off
    <Proxy *>
        Order deny,allow
        Allow from all

    ProxyPreserveHost On
    ProxyPass / http://localhost:8002/VirtualHostBase/http/
    ProxyPassReverse / http://localhost:8002/VirtualHostBase/http/

    <Directory "/home/web/foo/parts/trac/tracwsgi/cgi-bin">
        WSGIApplicationGroup %{GLOBAL}
        Options +Indexes FollowSymLinks
        AllowOverride None
        Allow from all
        Order allow,deny

    <Location "/trac">
        AuthBasicProvider ldap
        AuthType Basic
        AuthzLDAPAuthoritative off
        AuthName "Login"
        AuthLDAPURL "ldap://,dc=org?uid"
        AuthLDAPBindDN "cn=admin, dc=foo-bar, dc=org"
        AuthLDAPBindPassword secret
        require valid-user

share|improve this question
up vote 4 down vote accepted


ProxyPass /trac !

before ProxyPass for '/'.


You are also missing a WSGIProcessGroup directive. That Trac instance isn't going to run in the daemon mode process you created. See:

share|improve this answer
Great answer, useful added detail - fixed my problem. Good stuff Graham, thanks. – Jon Hadley Sep 9 '10 at 9:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.