nginx load balance with IIS backend servers waiting Host header
- by Elgreco08
i have a ubuntu 10.04 with nginx /0.8.54 running as a load balance proxy
named: www.local.com
I have two IIS backend servers which responds on Host header request
web1.local.com
web2.local.com
Problem:
When i hit my nginx balancer on www.local.com my backend servers respond with the default server blank webpage (IIS default page) since they are waiting for a right host header (e.g. web1.local.com)
my nginx.conf
upstream backend {
server web1.local.com:80;
server web2.local.com:80;
}
server {
listen 80;
location / {
proxy_pass http://backend;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $proxy_host;
}
}
any hint ?