Using 127.0.0.1 in resolver

#1

Using:

resolver 127.0.0.1 valid=300s;

Does not work. I assume this would simply uses the DNS servers listed in
/etc/resolv.conf? Thanks.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,245748,245748#msg-245748

#2

On 20 December 2013 23:20, justin removed_email_address@domain.invalid wrote:

Using:

resolver 127.0.0.1 valid=300s;

Does not work. I assume this would simply uses the DNS servers listed in
/etc/resolv.conf?

Your assumption is wrong. You’d need to be running a local DNS
resolver for that config to work.

#3

On 12/20/2013 3:20 PM, justin wrote:

Using:

resolver 127.0.0.1 valid=300s;

Does not work. I assume this would simply uses the DNS servers listed in
/etc/resolv.conf? Thanks.

The resolver directive tells NSD to do its own DNS lookups, bypassing
the system name lookup call (and thus /etc/resolv.conf) entirely.

#4

On Fri, Dec 20, 2013 at 04:12:45PM -0800, Darren P. wrote:

On 12/20/2013 3:20 PM, justin wrote:

Using:

resolver 127.0.0.1 valid=300s;

Does not work. I assume this would simply uses the DNS servers listed in
/etc/resolv.conf? Thanks.

The resolver directive tells NSD to do its own DNS lookups, bypassing
the system name lookup call (and thus /etc/resolv.conf) entirely.

That’s not quite true. Resolving that takes place during
configuration parsing uses the system resolver. Resolving
that takes place at run time uses the DNS servers from the
“resolver” directive. Please see http://nginx.org/r/resolver
and http://nginx.org/r/ssl_stapling for details.