[Fixed]-Hosting Django with passenger_wsgi.py

1👍

I had issues with Dreamhost specifically when upgrading from Django 1.6 to 1.8. One of the issues was with the WSGIHandler(). I can’t say this is your problem specifically, but you can try setting application like this:

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

Finally – make sure you restart passenger. There are docs here about how to do it: http://wiki.dreamhost.com/Passenger

From that page:

Whenever the code or configuration files for your application are modified, you must create or update the modification date of the file "tmp/restart.txt" in the application’s root directory tree in order to trigger Passenger to reinitialize the application. Passenger caches many resources so changes are not recognized unless the modification date of "tmp/restart.txt" is changed.

The most common method to make this change is to run "touch tmp/restart.txt" via SSH. (Ruby on Rails automatically creates a directory named "tmp". If you are creating non-RoR application, you may need to create the "tmp" directory manually.

Leave a comment