Make nginx ignore unresolvable upstream server host names during reload or boot up

shivramg94 nginx-forum at
Thu Mar 8 10:59:54 UTC 2018


I have multiple upstream servers configured in an upstream block in my nginx

upstream example2 { 

server { 
listen 80; 
location / { 
proxy_set_header X-Forwarded-For $remote_addr; 
proxy_set_header Host $host; 
proxy_set_header X-Real-IP $remote_addr; 
proxy_pass http://example2/; 

When i try to reload Nginx and at that time if one of my upstream servers
(say is not DNS resolvable, then the reload
fails with an error "host not found in upstream". 

Is there any way we can ask nginx to ignore such unresolvable host names or
rather configure Nginx to resolve these upstream server host names at run
time instead of resolving it during the boot up or reload process?

Posted at Nginx Forum:,278972,278972#msg-278972

More information about the nginx mailing list