proxy pass

Igor Sysoev is at
Fri Nov 30 09:54:20 MSK 2007

On Thu, Nov 29, 2007 at 11:39:48AM -0800, Cliff Wells wrote:

> > Second, after proxy_pass has parsed string it tries to resolve a host in
> > following order:
> > 
> > 1) search all described upstreams,
> > 2) try external resolver (named/bind/etc); you should define it
> >    in http, server, or location section:
> > 
> >        resolver;
> > 
> >    however, if the host is an ip address, then nginx does not send DNS
> >    query to the resolver, but use the ip address.
> Indeed this fixed it.  However, what's not clear to me is why Nginx
> tries to resolve since it is an IP address.

This is commom code path. Upstream code asks resolver code to resolve host.
Upstream code does not know that it is IP. Anyway, if you use IPs only, you
may set


and do not run local DNS server on the computer.

Igor Sysoev

More information about the nginx mailing list