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

I have the below Apache configuration. The following services are on each port:

8022 - Apache. Testing port, in the long run it will be port 80.

8002 - XDV, a themeing proxy which sits in front of a number of other services.

8202 - Trac, Python based bug tracker, which is one of the services xdv needs to sit in front of, hence the separation.

8082 - Plone CMS. Not shown in apache. XDV proxies requests to it.

The idea is that all requests come via Apache (8022), through the xdv proxy (8002) which applies a theme to each of the content sources (8082 & 8202)

However, I've noticed that during testing, if I access the Trac site via 8202, the 8022 site errors with RuntimeError: instance.__dict__ not accessible in restricted mode and will not work again till Apache is restarted. 8202 still works regardless of if 8022 is erroring or accessed.

This seems related to this Trac bug. But I'm not using mod_python and WSGIProcessGroup and WSGIApplicationGroup are the same value.

Why is this happening Is there a better way to set-up Apache? Namely the wsgi element?

In a previous iteration of this setup was within the 8022 host, but this meant it also served from this port and avoided the proxy


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

        ProxyPreserveHost On

        RewriteEngine On
        RewriteCond %{HTTP:Authorization} ^(.*)
        RewriteRule ^/(.*)$1 [P]



        <Directory "/home/web/foo/parts/trac/tracwsgi/cgi-bin">
                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
                WSGIProcessGroup %{GLOBAL}
                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 secretword
                require valid-user

share|improve this question

To start with, you should have:

WSGIProcessGroup trac

and not %{GLOBAL} as you have.

The way you have it, still running in embedded mode and some other Apache module, or embedded WSGI application could be interfering.

share|improve this answer
Meh. Coulda sworn I had it that way previously! Just changed back, got an Apache error regarding WSGIDaemonProcess location. Moved the whole block our and put between the two Virtual hosts and it seems fine. Will mark as chosen answer when it's been stable a few hours.... – Jon Hadley Sep 14 '10 at 9:43
You only needed to move WSGIDaemonProcess out and inside of VirtualHost would have been fine. Didn't notice it was in the Directory when it shouldn't have been. – Graham Dumpleton Sep 14 '10 at 21:48

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.