resolver does not seem to work with proxy_pass

Maxim Dounin mdounin at
Thu Nov 5 15:11:09 UTC 2015


On Mon, Nov 02, 2015 at 09:53:31PM -0800, SpolFirst SpolMiddle SpolLast wrote:

> I have setup nginx (1.9.5) as a proxy for few tomcat servers through
> proxy_pass directive. The proxy_pass points to a domain name (aws route53).
> The proxying works okay, but domain name is resolved only during nginx
> startup/reload. I have setup the resolver to force resolving domain name
> every few seconds, but it does not work.  Here is my config. Any thoughts
> on why this does not work?


>                 resolver valid=10s;
>                 set $target "";
>                 proxy_pass $target;

One possible reason is that "" is explicitly 
defined as an upstream{} block.

Maxim Dounin

More information about the nginx mailing list