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 WSGIPythonPathdirective 
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>

      ServerName mysite.com
    
      WSGIDaemonProcess mysite.com processes=2 threads=15
      WSGIProcessGroup mysite.com

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

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

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?

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to