I'm testing on the latest pinax 0.9a2 with mod_wsgi.
installed and created a basic project:
$ pinax-admin setup_project -b basic pinaxwsgi
it run's on dev server ok, but when I tried to use mod_wsgi it's not
working.
read here
http://pinax.readthedocs.org/en/latest/deployment.html#using-mod-wsgi
"Here is a basic configuration for Apache (assuming you are using
Python 2.7):"
it says python 2.7, while I'm using python 2.6, is there any
difference?
I got this error:
[Sun Dec 04 19:09:00 2011] [error] [client 208.111.62.118] mod_wsgi
(pid=28556): Exception occurred processing WSGI script '/path/to/
virtualenv-1.6.4/pinaxwsgi/mod_wsgi/dispatch.wsgi'.,
[Sun Dec 04 19:09:00 2011] [error] [client 208.111.62.118] Traceback
(most recent call last):,
[Sun Dec 04 19:09:00 2011] [error] [client 208.111.62.118] File "/
path/to/virtualenv-1.6.4/testpinaxwsgi/lib/python2.6/site-packages/
django/core/handlers/wsgi.py", line 250, in __call__,
[Sun Dec 04 19:09:00 2011] [error] [client 208.111.62.118]
self.load_middleware(),
[Sun Dec 04 19:09:00 2011] [error] [client 208.111.62.118] File "/
path/to/virtualenv-1.6.4/testpinaxwsgi/lib/python2.6/site-packages/
django/core/handlers/base.py", line 47, in load_middleware,
[Sun Dec 04 19:09:00 2011] [error] [client 208.111.62.118] raise
exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"'
% (mw_module, e)),
[Sun Dec 04 19:09:00 2011] [error] [client 208.111.62.118]
ImproperlyConfigured: Error importing middleware
django_openid.consumer: "No module named about",
on this same server another djago 1.3.1 app using same virtualenv/
apache2/wsgi, works fine,
So I wondering why pinax doesn't work under wsgi?
any help is appreciated!
Tom
PS:
my conf:
/path/to/virtualenv-1.6.4/pinaxwsgi/mod_wsgi/dispatch.wsgi
___________________________________________________
import os
import sys
sys.stdout = sys.stderr
import site
site.addsitedir('/path/to/virtualenv-1.6.4/testpinaxwsgi/lib/python2.6/
site-packages')
os.environ['PYTHON_EGG_CACHE'] = '/path/to/virtualenv-1.6.4/pinaxwsgi/
mod_wsgi/egg-cache'
# The first part of this module name should be identical to the
directory name
# of the OSQA source. For instance, if the full path to OSQA is
# /home/osqa/osqa-server, then the DJANGO_SETTINGS_MODULE should have
a value
# of 'osqa-server.settings'.
sys.path.append('/path/to/virtualenv-1.6.4')
sys.path.append('/path/to/virtualenv-1.6.4/pinaxwsgi')
os.environ['DJANGO_SETTINGS_MODULE'] = 'pinaxwsgi.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
_______________________________________________
apache httpd.conf section:
_______________________________________________
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com *.example.com
<Directory /path/to/virtualenv-1.6.4/pinaxwsgi/mod_wsgi>
Order allow,deny
Allow from all
</Directory>
WSGIDaemonProcess example display-name=example user=www processes=2
threads=15
WSGIScriptAlias / /path/to/virtualenv-1.6.4/pinaxwsgi/mod_wsgi/
dispatch.wsgi
</VirtualHost>