Bad gateway error message with Django
I’m getting a bad gateway error. (My own fault for using Youtube)
This is the Nginx error message
2018/01/10 17:07:58 [error] 2210#2210: *5 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 126.96.36.199, server: _, request: “GET / HTTP/1.1”, upstream: “http://unix:/home/django/gunicorn.socket:/”, host: “188.8.131.52”
2018/01/10 17:08:45 [error] 2210#2210: *7 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 184.108.40.206, server: _, request: “GET / HTTP/1.1”, upstream:
Looking at the other questions I changed
ALLOWEDHOSTS = [ipaddress]
and added ALLOWEDHOSTS += ip_addresses() top the bottom
A really dumb question do I change the secret key on the droplet to the secret key from my project?
from django.core.wsgi import getwsgiapplication
application = getwsgiapplication()
from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.