Resolver not working as expected
Sharan J
jsharan15 at gmail.com
Wed Aug 29 06:55:37 UTC 2018
Hi,
Thanks for the response :)
But, if I remove all the DNS servers from my resolv.conf then, the
nameserver configured by the "resolver" directive is been used while
parsing the configuration. Is this an expected behavior?
Thanks,
Shanthu
On Mon, Aug 27, 2018 at 7:00 PM Maxim Dounin <mdounin at mdounin.ru> wrote:
> Hello!
>
> On Mon, Aug 27, 2018 at 06:56:01PM +0530, Sharan J wrote:
>
> > Hi,
> >
> > Sample conf:
> >
> > http{
> > resolver x.x.x.x;
> > server {
> > server_name _;
> > location / {
> > proxy_pass http://somedomain.com;
> > }
> > }
> >
> > I have nameservers configured in my resolv.conf. But, somedomain.com
> will
> > be configured in x.x.x.x DNS server only. So, I have specified resolver
> in
> > my nginx.conf. However, during startup/reload I get "host not found in
> > upstream error". Why nginx is not considering resolver conf and searches
> > only in the nameservers configured in resolv.conf?
>
> Names as written in the configuration are resolved while parsing
> the configuration using the system resolver. DNS servers defined
> by the "resolver" directive are only used for dynamic / run-time
> name resolution - for example, when variables are used in the
> "proxy_pass" directive.
>
> --
> Maxim Dounin
> http://mdounin.ru/
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20180829/9763c34f/attachment-0001.html>
More information about the nginx
mailing list