# Using 127.0.0.1 in resolver

**URL:** <https://www.ruby-forum.com/t/using-127-0-0-1-in-resolver/238180>\
**Category:** NGINX\
**Created:** [December 21, 2013, 12:20am UTC](https://www.ruby-forum.com/t/using-127-0-0-1-in-resolver/238180 "2013-12-21T00:20:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![justin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/3ab097/32.png) [@justin](https://www.ruby-forum.com/u/justin)\
**Post date:** [December 21, 2013, 3:57pm UTC](https://www.ruby-forum.com/t/using-127-0-0-1-in-resolver/238180/4 "2013-12-21T15:57:57Z")

</div>

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 [Module ngx\_http\_core\_module](http://nginx.org/r/resolver)  
and [Module ngx\_http\_ssl\_module](http://nginx.org/r/ssl_stapling) for details.

---

_[View the full topic](https://www.ruby-forum.com/t/using-127-0-0-1-in-resolver/238180)._
