[Fixed]-Django 1.9 + Passenger on Dreamhost: Web application could not be started

1👍

This was solved by using the correct settings in the passenger_wsgi.py:

import sys, os
cwd = os.getcwd()
sys.path.append(cwd)
project_location = cwd + '/my_project'
sys.path.insert(0,project_location)

INTERP = os.path.expanduser("/home/user/python/Python-3.4.3/venv/bin/python")

if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)

sys.path.insert(0,'$HOME/python/Python-3.4.3/venv/bin')
sys.path.insert(0,'$HOME/python/Python-3.4.3/venv/lib/python3.4/site-packages/django')
sys.path.insert(0,'$HOME/python/Python-3.4.3/venv/lib/python3.4/site-packages')


os.environ['DJANGO_SETTINGS_MODULE'] = "my_project.settings"
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

Leave a comment