I am trying to configure nginx along with Gunicorn for a Django project. nginx gives me the following error:
DisallowedHost at /
Invalid HTTP_HOST header: 'localhost:90,localhost:90'. The domain name provided is not valid according to RFC 1034/1035.
This is my nginx configuration
server {
listen 90;
listen [::]:90;
server_name xxxx;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/user/djangopro/djangoapp;
}
location / {
include proxy_params;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_buffering off;
proxy_redirect off;
proxy_pass http://localhost:8200/;
}
}
Gunicorn maintains the site correctly localhost:8200. Can someone tell me what causes the error?
source
share