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

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 problems getting mod_wsgi to run in daemon mode on my Debian / Apache 2.2.16 / Python 2.6.6 / mod_wsgi 3.3 / Django 1.3 setup. Everything works OK in embedded mode, but when I try to switch to daemon mode like described in so many HOWTO's, it is simply not activated (environ['mod_wsgi.process_group'] always returns the empty string, but no errors are output).

Furthermore, setting the python path with neither the WSGIPythonPath directive nor the python-path option for WSGIDaemonProcess seems to work - outputting sys.path in the wsgi script always returns the original system python path.

I read up on configuring and debugging mod_wsgi, but I just seem stuck here so any help would be appreciated!

In my virtual host config file I have

<VirtualHost *:80>


  WSGIDaemonProcess processes=2 threads=15

  WSGIScriptAlias / /path/to/mysite/wsgi/django.wsgi

  <Directory /path/to/mysite/wsgi/>
    Order deny,allow
    Allow from all


set up. To test activation of daemon mode, I use this wsgi script:

import sys
import os

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')

def application(environ, start_response):
    print >> sys.stderr, 'mod_wsgi.process_group = %s' % repr(environ['mod_wsgi.process_group']) 

    from django.core.handlers.wsgi import WSGIHandler
    _application = WSGIHandler()

    return _application(environ, start_response)

and the resulting log file always says:

mod_wsgi.process_group = ''

which, accroding to the documentation, indicates that daemon mode is not being used. I checked my setup multiple times, the versions of Apache, mod_wsgi and Python are matching and my setup is correct according to all the HOWTO's I've read out there. What could I be missing?

share|improve this question
up vote 0 down vote accepted

It turned out that a symlink wasn't set correctly so my config changes never loaded in Apache. Sorry for wasting your time, I thought I checked everything thoroughly before posting.

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.