nginx在启动时,会对proxy_pass中的主机名进行dns解析,如果解析失败就停止启动。
[emerg] 1#1: host not found in upstream "q_web"
nginx的配置如下:
server {
listen 80;
server_name q.cnblogs.com;
access_log off;
location / {
resolver 127.0.0.11;
proxy_set_header Host $host;
proxy_pass http://q_web;
}
}
请问如何可以躲过这个dns解析检查让nginx先启动起来?
相关问题
- How can I prevent my Shiny App from disconnecting
- Can't configure nginx as a proxy for tomcat wi
- How to set Nginx URI to fix empty URI in redirect
- why does connect domain to “Shopify” ask for eithe
- Nginx with Daphne gives 502 Bad Gateway
https://serverfault.com/questions/700894/make-nginx-ignore-site-config-when-its-upstream-cannot-be-reached