Attempting to serve django admin site to no avail. When requested, an internal server 500 error occurs. The error states that wsgi.py cannot be loaded as a Python module. The following is an internal server error and related files.
Perhaps related: python local assembly was first tried. Another system administrator tried this local python build and it will not run. This local build only works for my user. I say this is possibly related, but also tried to use system python.
500 internal server errors when requesting a site. 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>
source
share