Trying to serve a django admin site to no avail. A 500 internal server error occurs when requested. The error claims the wsgi.py cannot be loaded as Python module. Below see the internal server error and the relevant files.
Possibly related: At first was trying with a local build of python. Another system admin tried this loca build of python and it would not execute. This local build is only working for my user. I say this is possibly related but have tried with the system python too.
500 internal server error when the site is requested. Here is the server error log:
[error] [client 208.120.168.168] mod_wsgi (pid=20239): Target WSGI script '/home/andrew/public_html/7DigAdmin/wsgi.py' cannot be loaded as Python module.
[error] [client 208.120.168.168] mod_wsgi (pid=20239): Exception occurred processing WSGI script '/home/andrew/public_html/7DigAdmin/wsgi.py'.
[error] Traceback (most recent call last):
[error] File "/home/andrew/public_html/7DigAdmin/wsgi.py", line 5, in ?
[error] import os
[error] ImportError: No module named os
wsgi.py:
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "/home/andrew/SCTN_7DigAdmin/SCTN_7DigAdmin/SCTN_7DigAdmin.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
wsgi.conf:
LoadModule wsgi_module modules/mod_wsgi.so
WSGIPythonHome /usr/local/bin/python2.7
httpd.conf:
WSGIScriptAlias /7dadmin /home/andrew/public_html/7DigAdmin/wsgi.py
<Directory /home/andrew/public_html/7DigAdmin>
Order allow,deny
Allow from all
</Directory>