Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Nginx to iis proxy, periodical Invalid hostname error

$
0
0
Hi all.

I have nginx proxy for iis 7 server, but when I addressing to iis server I have a 400 Bad Request Invalid Hostname error periodically (when I press F5). So I saw the nginx and the iis logs and saw that my queries which have a 400 error code does not reach the IIS server.

I tried several configs:

location / {
proxy_set_header x-real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;

proxy_pass http://localhost:80;
}

....

location / {
proxy_pass http://localhost:81;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
port_in_redirect off;
proxy_connect_timeout 300;
}
...

location / {
proxy_pass http://localhost:81;
proxy_set_header Host $host;
proxy_set_header X-Accel-Expires 0;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

Please help find the possible causes of this behavior

Viewing all articles
Browse latest Browse all 4759

Trending Articles


Practice Sheet of Right form of verbs for HSC Students


TYKEMA GLEATON


The Conjuring 2 (Tamil Dubbed)


Woman stabbed 12 times and dumped in ditch


Moondru Mudichu 07-06-2016 – Polimer tv Serial


Trio remanded on gun, other serious charges


Rick Ross & Etana – Kiss Of Judas – Single [iTunes Plus M4A]


The 6 Best Sex Scenes in Nollywood Movies


Take this week's NJ.com Local News Quiz


Angeline Yap kym?



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>