Reputation: 9802
I am getting the following error when navigating to the url for my test site...
My settings.py
file looks correct...
Is there any other reason that anyone can think of why I might be getting this error? I have tried deleting all .pyc files and restarting nginx
and tried multiple ALLOW_HOSTS
settings.
I am using Amazon EC2
and Django 1.10.4
Upvotes: 1
Views: 2042
Reputation: 1
I experienced this problem while using App Service.
First make sure you have defined ALLOWED_HOSTS correctly in your settings.py If you are using environment variables, make sure to set it by going to Settings, then Configuration, then click on New Application Settings; in the Name field, set the name of the environment variable and in the Value field, set the value.
If you've done this or you didn't use environment variables, go to Overview in the menu and either Stop and Start your app or restart your app.
Upvotes: 0
Reputation: 11
I came across this problem and I found a solution here by George:
"...I restarted the instance I was working on."
I am running an Ubuntu(20.04) EC2 instance on AWS.
Upvotes: 1
Reputation: 3756
Using digital ocean I was able to fix this issue by restarting uwsgi with the following in the terminal
systemctl restart uwsgi.service
Upvotes: 1