proxy pass

Igor Sysoev is at rambler-co.ru
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 127.0.0.1;
> > 
> >    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 127.0.0.6 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

     resolver 127.0.0.1;

and do not run local DNS server on the computer.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list