I'm running apache / os x and serving up localhost pages to test django on my laptop. I've already verified all the following
• python is working fine and up to date (2.5.1)
• django available to python and up to date (1,1,0, 'final', 0)
• mod_wsgi module is loaded among apache modules in my apache config - Check!
• path to django application is in vhost.conf with proper permissions - OK!
• mod_wsgi vhost.conf tested and working fine in the intended django application directory - test application through localhost pulls up 200 OK, 'hello world!'
• django default application has been created using 'django-admin.py startproject mysite'
• django application works fine on port 8000 using development server - OK!
• path to the new django application (called mysite) is on python path - verified!
All this is verified and when I run the wsgi script with DJANGO_SETTINGS_MODULE settings.py and load the django app, I still get 'could not import settings 'mysite.settings' etc.
Since this seems to cover the basic troubleshooting, are there any further steps I could take to find out the problem?
================
Python path is valid, verified. The django development server runs fine with the command line on port 8000.
The apache config has the typical module loaded: LoadModule wsgi_module libexec/apache2/mod_wsgi.so
vhost.conf is included from apache config as follows
NameVirtualHost: *.80
<Directory /users/useracct/scripts/python>
Order allow,deny
Allow from all
</Directory>
<Directory /Library/WebServer/Documents>
Order allow,deny
Allow from all
</Directory>
WSGIDaemonProcess localhost user=username group=staff threads=25
WSGIProcessGroup localhost
WSGIScriptAlias /mysite /users/useracct/Sites/mysite/mysite.wsgi
<Directory /users/useracct/Sites/mysite/>
Allow from all
</Directory>
DocumentRoot /Users/useracct/Sites/
Virtualenv is not set up with this account, so that is one less possible cause.
=======================
and the wsgi script file (trying to keep it minimal):
import os, sys
path = '/users/usracct/sites/mysite'
if path not in sys.path:
sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()