Django: 400 Error with Debug=False and ALLOWED_HOSTS=[“*”]
问题 I'm trying to run a relatively simple Django server on Python 3.5.3 on an Ubuntu DigitalOcean droplet. I'm using a Gunicorn server with nginx. The server runs fine when DEBUG=True in settings.py . But when I set it to False , I get a 400 error when trying to visit the page. I tried setting ALLOWED_HOSTS = ['*'] , but I still get the same error. I've looked on a lot of forums and many questions on SO but none of the solutions have worked. EDIT Gunicorn logs from startup: [2016-09-13 00:02:01