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'm trying to run a django site with apache mod-wsgi with nginx as the front-end to reverse proxy into apache.

In my Apache ports.conf file:


    DocumentRoot /var/apps/example/

    WSGIDaemonProcess example
    WSGIProcessGroup example

    Alias /m/ /var/apps/example/forum/skins/
    Alias /upfiles/ /var/apps/example/forum/upfiles/
    <Directory /var/apps/example/forum/skins>
            Order deny,allow
            Allow from all

    WSGIScriptAlias / /var/apps/example/django.wsgi


In my nginx config:

server {
        listen       80;

        location / {            
            include /usr/local/nginx/conf/proxy.conf;
            proxy_redirect default;
            root /var/apps/example/forum/skins/;

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;


After restarting both apache and nginx, nothing works, simply hangs or serves index.html in my /var/www/ folder.

I'd appreciate any advice to point me in the right direction. I've tried several tutorials online to no avail.

share|improve this question
Have you confirmed whether Apache/mod_wsgi works by access the backend web server first, ie., bypassing nginx? – Graham Dumpleton Jun 9 '10 at 1:07
Hmm, good point. It worked before when I had PHP, but then I installed mod_wsgi and everything seems broken. – user11243 Jun 9 '10 at 17:06
ok nevermind it works now, the problem was /root/.python-eggs. It was trying to find python eggs at /var/www/... – user11243 Jun 9 '10 at 18:20
You might post that as the answer so that this question gets marked as answered. – beans Mar 7 '11 at 18:38

I've got a sneaky suspicion that the problem might be /root/.python-eggs -- I think you might be trying to find python eggs at /var/www/... ;)

share|improve this answer

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.