proxy_pass does not resolve DNS using /etc/hosts

后端 未结 2 1592
一生所求
一生所求 2021-02-05 12:15

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

2条回答
  •  走了就别回头了
    2021-02-05 13:06

    In short, you need to install dnsmasq locally and use 127.0.0.1 as a resolver.

    See this related question and answer:

    When using proxy_pass, can /etc/hosts be used to resolve domain names instead of "resolver"?

提交回复
热议问题