Passenger not kicking in for Django project
So I’ve gone back and fourth with Dreamhost Support via ticket for the last 24 hours. They’re either not listening at all to the details of my problem, or there really is something wrong with my configs. The latter is doubtful. I’m at the point of either calling them on the phone to have an arguement or divulge how I’ve set it up on a public Internet forum. I’m choosing to live dangerously before I make a phone call.
The project is supposed to:
- Have a vuejs front end at
/that makes api calls to retrieve data and display/update it to an api that works and is powered by:
- A django rest api on the back end - this is my Passenger app.
- Work simply with Shared Hosting.
This configuration works.
I have a working test version of my project at test.example.com that’s setup as such:
With this config I could access both the index.html at the root url / and any of the django rest api routes and admin via /admin - it worked beautifully.
This configuration is failing
I was logged in via SSH using my dreamhost user. I wanted to make re-deployment easier on myself so I removed the folder for example.com and simply copied my test folder over with the same name and enabled passenger on the dreamhost interface. Then, I reconfigured my passenger_wsgi.py to point to the correct env folder and recreated the env just in case.
Now whenever I try to access example.com/admin I’m getting an Apache 404 error message. The index (stored in the public folder) still gets served at
/ (as it should) but all API calls return an Apache 404 error response.
I know from previous use of Passenger, when I mess up my config, I get both Passenger error responses as well as (often) a page showing where the error was thrown. After several emails back and fourth with Dreamhost, they’re insisting it’s a user configuration issue. I don’t understand how this can be. Here’s the config for the production version at example.com:
As you can see, there’s no passenger_wsgi.pyc file genated. No python cache started. Passenger isn’t even picking this config up.
- Removing the hosting for example.com and re-adding it
- Enabling/disabling passenger
- Running the django project manually with
. env/bin/activate && python rsvp_server/manage.py runserver- the server starts fine this way.
At this point Dreamhost support is starting to throw me the “We may not be able to support this problem” speech. I have no control over how Passenger starts and stops outside of their hosting interface via their dashboard. Can anyone else speak to why Passenger isn’t starting/serving Django? Any feedback is appreciated.
After a few no hours and crickets from Dreamhost Support, I got fed up, deleted the hosting for the production domain (again) and re-created it under a new user via shared hosting. That solved my problem.
I cannot explain why passenger broke for example.com - but it’s fair to say it’s up to Dreamhost to explain why.
My configs are redacted to keep the installation safer. If anyone wants advice, you may message me directly.