I'm trying to migrate my fully working Django 1.9.6 project with Python 2.7.3 to Dreamhost. I'm not sure if my current file structure is correct, as well as my passenger_wsgi.py and project.fcgi files.
When I try to access the website I get a 500 Internal Server Error message.
Here's my directory structure
home
user
website.com
.htaccess
env
bin
include
lib
local
public
assets
passenger_wsgi.py
manage.py
project.fcgi
django-project
settings.py
urls.py
wsgi.py
django-app
Here's my passenger_wsgi.py
import sys, os
cwd = os.getcwd()
sys.path.append(cwd)
sys.path.append(cwd + '/django-project')
if sys.version < "2.7.3": os.execl("/home/user/website.com/env/bin/python",
"python2.7.3", *sys.argv)
sys.path.insert(0,'/home/user/website.com/env/bin')
sys.path.insert(0,'/home/user/website.com/env/lib/python2.7/site-packages/django')
sys.path.insert(0,'/home/user/website.com/env/lib/python2.7/site-packages')
os.environ['DJANGO_SETTINGS_MODULE'] = "django-project.settings"
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
Here's my django-project.fcgi
import sys, os
sys.path.insert(0, "/home/user/website.com/env/bin/python")
os.chdir("/home/user/website.com/django-project")
os.environ['DJANGO_SETTINGS_MODULE'] = "django-project.settings"
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")
Any ideas where I'm going wrong? This is my first time launching a website like this so I may be making a fundamental directory structure mistake.
Let me know if I should provide any other files or information.