Welcome! Log In Create A New Profile

Advanced

Re: resolver directive doesn't fallback to the system DNS resolver

Francis Daly
January 07, 2015 07:16PM
On Wed, Jan 07, 2015 at 05:37:22PM -0600, Kunal Pariani wrote:

Hi there,

> http {
> server {
> listen 443;
> location ^~ /zss
> {
> proxy_pass https://www.example.com$request_uri;
> }
> }
> }

Ok, I see the "no resolver defined to resolve www.example.com" message
when I make a request that matches that location.

> Although i don't want to use this resolver directive here and instead just want nginx to use the system DNS resolver (from /etc/resolv.conf). Is there a way to achieve this ?
Unless something has changed recently that I haven't seen, my understanding is:

if the hostname is known at start time, nginx will use the system resolver
to resolve it, and will use the result forever

otherwise, you must use a "resolver" directive to tell nginx which name
servers to use for runtime resolution.

http://nginx.org/r/resolver

There is no default for "resolver"; if you want one to be used, you must
configure it explicitly. So I think the answer to your question is "no".

(You could probably come up with a way to read /etc/resolv.conf when it
changes, and update the nginx config and reload it; but that's a "dynamic
reconfiguration" problem, not an "nginx dynamic reconfiguration" problem.)

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

resolver directive doesn't fallback to the system DNS resolver

kunalvjti January 05, 2015 06:06PM

Re: resolver directive doesn't fallback to the system DNS resolver

kunalvjti January 07, 2015 03:50PM

Re: resolver directive doesn't fallback to the system DNS resolver

Francis Daly January 07, 2015 06:16PM

Re: resolver directive doesn't fallback to the system DNS resolver

kunalvjti January 07, 2015 06:38PM

Re: resolver directive doesn't fallback to the system DNS resolver

Francis Daly January 07, 2015 07:16PM

Re: resolver directive doesn't fallback to the system DNS resolver

Yichun Zhang (agentzh) January 07, 2015 07:32PM

Re: resolver directive doesn't fallback to the system DNS resolver

kunalvjti January 12, 2015 04:50PM

Re: resolver directive doesn't fallback to the system DNS resolver

Yichun Zhang (agentzh) January 12, 2015 05:20PM

Re: resolver directive doesn't fallback to the system DNS resolver

kunalvjti January 12, 2015 05:56PM

Re: resolver directive doesn't fallback to the system DNS resolver

itpp2012 January 13, 2015 04:58AM

Re: monitor upstream IP addr changes without using nginx's resolver

kunalvjti January 16, 2015 02:18PM

Re: monitor upstream IP addr changes without using nginx's resolver

itpp2012 January 16, 2015 02:59PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 311
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready