In nginx, the proxy_pass directive proxy_pass not resolve DNS using the /etc/hosts . Any way to enable this feature (possibly using Lua as a last resort)?
proxy_pass
/etc/hosts
In short, you need to install dnsmasq locally and use 127.0.0.1 as a converter.
See this related question and answer:
When using proxy_pass, can / etc / hosts be used to resolve domain names instead of "resolver"?
Nginx looks at the IP once at startup and does not check again if it is statically installed. To get around this, you can try setting it as a variable:
resolver 127.0.0.1; set $url "domain.com"; proxy_pass http://$url;