nginx “host could not be resolved”报错解决办法

用dnsmasq在本地自建DNS服务,nginx配置 resolver指向127.0.0.1


配置 dnsmasq.conf

domain-needed
bogus-priv
cache-size=51200
listen-address=127.0.0.1

#注意此处指向DNS服务,实际还是向内网DNS查询

resolv-file=/etc/resolv.conf   


参考:http://www.jb51.net/article/60522.htm https://www.jianshu.com/p/d97b259b6f19

确认 取消
2条评论
test comment!!!