G
G
glader2019-10-06 16:23:42
Nginx
glader, 2019-10-06 16:23:42

Why is nginx passing socket path in domain name?

I have nginx configured to accept all incoming requests regardless of the domain name

listen 80 default_server;
  listen [::]:80 default_server;

These requests are sent to the wsgi application.
location / {
        proxy_pass http://app_server;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_redirect off;
        charset  utf-8;
    }

Quite regularly I get an application error
Invalid HTTP_HOST header: '/path/to/wsgi.sock:'. The domain name provided is not valid according to RFC 1034/1035.

Please tell me how to fix this.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Derepko, 2019-10-06
@glader

https://stackoverflow.com/questions/33097700/djang...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question