I\'ve had my django app deployed and working perfectly with apache and mod_python, according to the apache deployment instructions. But since I changed the project structure
for my Django 1.5 and mod_wsgi, I resolved it like this:
httpd.conf:
WSGIScriptAlias /mysite "/var/www/html/mysite/mysite/wsgi.py"
WSGIPythonPath "/var/www/html/mysite/mysite"
Order deny,allow
Allow from all
wsgi.py:
the sys.path.append(path) to let mysite.settings known
import os
import sys #new
path = '/var/www/html/mysite' #new
if path not in sys.path: #new
sys.path.append(path) #new
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
another thing, to avoid error like below
Premature end of script headers: wsgi.py
you need remove cgi configure from httpd.conf
AddHandler cgi-script .py