Errors due to Ubuntu upgrades
DreamHost recently upgraded web servers to use a newer version of Ubuntu. With the new version of Ubuntu comes a newer version of Django. If you previously installed your version of Django using the old django-setup.py install script, you could potentially see errors with your website. Unfortunately, technical support is unable to assist with any older installation errors.
The only recommended way to currently install Django is in a virtualenv.
Application isn't working
If your application isn't working, make sure you’re using the correct usernames, passwords, database names, and hostnames in the /projectname/settings.py file.
If you make changes to the code, such as working through the official tutorials, and they don't seem to work, make sure to kill any existing Python processes and reload the page:
[server]$ pkill python
Changes are not reflected
If you modified your application and your changes do not seem to be reflected, you may need to notify Passenger about your change by creating or modifying
[server]$ touch /home/user/example.com/tmp/restart.txt
- Passenger looks for this file and reloads the application when this file is modified.
Shared hosting changes are not reflected
If you're using shared hosting and your changes do not seem to be reflected, you can notify Passenger about your change by running the following command:
[server]$ touch passenger_wsgi.py
Custom Python version
If you installed a custom version of Python in your directory and you'd like to use it, add the following to your
if sys.hexversion < 0x2060000: os.execl("/path/to/your/copy/of/python2.7", "python2.7", *sys.argv)
If you're getting meaningless 500 pages even though you have DEBUG enabled in your Django app, you're probably running into a Passenger problem dealing with errors. View the 500 Errors with Passenger WSGI Workaround article for details.
If you're following the Django tutorial or migrating an existing project, you may get "Premature end of script headers" in your sites error log. This may be due to the Passenger file not including your project directory in its path. One solution is to open
passenger_wsgi.py and add the following:
404 error on admin page
When visiting your example.com/admin/ page, you may see a 404 error.
404 "The requested URL /admin/ was not found on this server"
Checking your error.log file, you may see the following:
File does not exist: /home/user/example.com/public/admin
If you're sure there is no issue with your code, make sure your website is under a username that is not being used for anything else, such as another website or application code.
Splitting out the Django website under its own unique username should resolve this issue.