I know this question has been discussed. But the problem persists, and I am left without any solution. Please help.
My platform is: Ubuntu 14.04 LTS, Python 3.4, MySQL 5.5, Django 1.7, Nginx 1.4.6, and Gunicorn 19.1.1.
When I set DEBUG = False
in the production server, my Django application runs OK for maybe half a day. And after that, the annoying Server Error (500)
always appear for certain functions, but not every one. If I turn DEBUG = True
, everything will be fine.
I also set ALLOWED_HOSTS = ['*']
. Some said that it should not be a wild card in production. But my app is for public, how should I set it? Others said that it should be 'localhost'
. But only localhost
can access the server? Why go production, then?
Is there a standard solution to this problem? Thanks.