I'm using Ubuntu 14.04, Apache 2.4, Python 2.7.6, Django 1.9.5 and mod_wsgi 4.5.1 installed from source.
My folder structure looks like so:
project
-site
-mysite
-apache
-wsgi.py
wsgi.py:
import os, sys
from django.core.wsgi import get_wsgi_application
sys.path.append('/home/me/project/site')
sys.path.append('/home/me/project/site/mysite')
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
application = get_wsgi_application()
In my main /etc/apache2/sites-enabled/000-default.conf file I have only edited the following
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
WSGIScriptAlias / /home/seb/project/funel/mysite/apache/wsgi.py
<Directory "/home/seb/project/funel/mysite/apache">
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
What am I doing wrong? I seem to be getting a 500 Internal Server Error even though restarting Apache doesn't show any problems.