Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

It aims to allow a server on localhost:8002 and a trac wsgi server to share an ldap server and appear on the same domain/port.

The rules work in isolation, but not together. 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

1 Answer 1

up vote 2 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.