proxy_pass 不使用/etc/hosts 解析 DNS [英] proxy_pass does not resolve DNS using /etc/hosts
本文介绍了proxy_pass 不使用/etc/hosts 解析 DNS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 nginx 中,proxy_pass
指令没有使用 /etc/hosts
文件解析 DNS.有什么方法可以实现这种可能性(也许将 Lua 作为最后的手段)?
In nginx the proxy_pass
directive is not resolving DNS using the /etc/hosts
file. Any way to enable this possibility (maybe by leveraging Lua as a last resort)?
推荐答案
总之,需要在本地安装dnsmasq,使用127.0.0.1作为解析器.
In short, you need to install dnsmasq locally and use 127.0.0.1 as a resolver.
查看此相关问答:
使用proxy_pass时,可以用/etc/hosts代替resolver"来解析域名吗?
这篇关于proxy_pass 不使用/etc/hosts 解析 DNS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文