I'm trying to get Apache2 to host my Django project located in /var/www/tbg/
. I get an Internal Server Error (500). I have already installed libapache2-mod-wsgi and
My files are as follows:
project.wsgi file: /var/www/tbg/django.wsgi
import os
import sys
sys.path = ['/var/www/tbg'] + sys.path
os.environ['DJANGO_SETTINGS_MODULE'] = 'tbg.settings'
import django.core.handlers.wsgi
XSendFile On
application = django.core.handlers.wsgi.WSGIHandler()
sites-available/127.0.0.1
file:
<VirtualHost *:80>
WSGIScriptAlias / /var/www/tbg/django.wsgi
ServerName 127.0.0.1
Alias /static /usr/local/lib/python2.6/dist-packages/django/contrib/admin/static/
Alias /media /var/www/tbg/media/
XSendFile On
<Directory /var/www/tbg/>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
httpd.conf
file:
WSGIScriptAlias / /var/www/tbg/tbg/wsgi.py
WSGIPythonPath /var/www/tbg
Alias /static /var/www/tbg/static/
Alias /media /var/www/tbg/media/
XSendFile On
<Directory /var/www/tbg/>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
I think those are all of the important files. Let me know what more information you need.