nginx: configuration file /etc/nginx/nginx.conf test failed (host not found in upstream) nginx: configuration file /etc/nginx/nginx.conf test failed (host not found in upstream) nginx nginx

nginx: configuration file /etc/nginx/nginx.conf test failed (host not found in upstream)


All you need is to put resolver that can resolve such domain name:

resolver                  8.8.8.8 valid=300s;resolver_timeout          10s;

Google DNS (8.8.8.8) can resolve it, but it resolves to internal address belongs to network class C.

$ dig @8.8.8.8 www.class.com.192.168.33.10.xip.io;; ANSWER SECTION:www.class.com.192.168.33.10.xip.io. 299 IN A    192.168.33.10


Your problem is coming from this line:

proxy_pass http://www.class.com.192.168.33.10.xip.io:8055;

Most likely the server is having difficulty resolving that DNS name. You may also want to look at https://serverfault.com/questions/341810/nginx-failing-to-resolve-upstream-names-on-reload-even-if-they-do-resolve-by-the


A bit late maybe, but there is a simple solution. Change

www.class.com.192.168.33.10.xip.io

into

www.class.com.192.168.33.10.nip.io

and it should resolve on any DNS.