I'm trying to deploy a Django app in production, on an apache server, using mod-wsgi. mod-wsgi is installed and working fine. When I run the Django server, it launches fine, but I can't access it on the server or online, and I don't understand why. I'm posting the relevant section of
ports.conf (for apache), and my
wsgi.py (automatically generated as pinax.wsgi when I created my project, renamed to wsgi.py, this does not affect anything) script below.
<VirtualHost *:80> ServerName <myserver>.org WSGIDaemonProcess mysite python-path=/<myapp>-env/pinax-env/lib/python2.5/site-packages WSGIProcessGroup mysite WSGIScriptAlias / /<myapp>/deploy/wsgi.py <Directory /<myapp>/deploy> Order deny,allow Allow from all </Directory> </VirtualHost>
# pinax.wsgi is configured to live in projects/<myapp>/deploy. import os import sys from os.path import abspath, dirname, join from site import addsitedir sys.path.insert(0, abspath(join(dirname(__file__), "../../"))) From django.conf import settings os.environ["DJANGO_SETTINGS_MODULE"] = "<myapp>.settings" sys.path.insert(0, join(settings.PROJECT_ROOT, "apps")) from django.core.handlers.wsgi import WSGIHandler application = WSGIHandler()