I am hosting my django app on Linode with Ubuntu OS and i have configured apache webserver. When I try to access the site i get 500 Internal Server error Apache logs show the following error
Traceback (most recent call last):
File "/home/mosajan/artistry/artistry/wsgi.py", line 12, in <module>
from django.core.wsgi import get_wsgi_application<br>
ImportError: No module named 'django'
Target WSGI script '/home/mosajan/artistry/artistry/wsgi.py' cannot be loaded as Python module.
Exception occurred processing WSGI script '/home/mosajan/artistry/artistry/wsgi.py'.
wsgi.py
import os
import sys
from django.core.wsgi import get_wsgi_application
sys.path.append('home/mosajan/artistry/')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'artistry.settings')
application = get_wsgi_application()
apache2 conf file artistry.conf
Alias /static /home/mosajan/artistry/static
<Directory /home/mosajan/artistry/static>
Require all granted
</Directory>
<Directory /home/mosajan/artistry/artistry>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIScriptAlias / /home/mosajan/artistry/artistry/wsgi.py
WSGIDaemonProcess artistry python-path=/home/mosajan/artistry python-home=/home/mosajan/artistry/venv
WSGIProcessGroup artistry
WSGIPythonHome /home/mosajan/artistry/venv
WSGIPythonPath /hom/mosajan/artistry
python manage.py runserver 0.0.0.0:8000
in your project folder, are you able to see the project and run it without any errors? – Tiago Martins Peres