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先启动起来?
https://serverfault.com/questions/700894/make-nginx-ignore-site-config-when-its-upstream-cannot-be-reached