I'm currently trying to set up a Django project using passenger wsgi. I followed the instructions laid out on this post:
However, I'm receiving an error "An error occurred importing your passenger_wsgi.py"
I am able to successfully receive a hello word message if I put this as my passenger_wsgi.py:
def application(environ, start_response):
start_response('200 OK', [('Content-type', 'text/plain')])
return ["Hello, world!"]
But for some reason if I use the following (outlined in the above post), I am unable to get past the error. I replace the word 'project' with my named project on the path.append and os.environ lines and with subdomain.domain.com on the path.insert lines. Am I missing something? I am very new to this stuff and would appreciate any help I can get! Thanks.
Below is the current passenger_wsgi.py that receives the error on importing.
import sys, os
cwd = os.getcwd()
sys.path.append(cwd + '/project')
if sys.version < "2.7.3": os.execl("$HOME/<site>/env/bin/python",
os.environ['DJANGO_SETTINGS_MODULE'] = "project.settings"
application = django.core.handlers.wsgi.WSGIHandler()