Forum: NGINX resolver for upstream

2974d09ac2541e892966b762aad84943?d=identicon&s=25 badtzhou (Guest)
on 2014-06-25 02:19
(Received via mailing list)
We are trying to use resolver on upstream. It is not working for some
reason. We are using nginx 1.6.0. Supposedly the feature should be
available
on 1.5.12.

When we try to use it, It always give us an error. nginx: [emerg]
invalid
parameter "resolve" in... And when I checked the source code, it doesn't
look like the feature was in there.

According to upstream documentation it should work like this:
resolve
monitors changes of the IP addresses that correspond to a domain name of
the
server, and automatically modifies the upstream configuration without
the
need of restarting nginx (1.5.12).
In order for this parameter to work, the resolver directive must be
specified in the http block. Example:

http {
    resolver 10.0.0.1;

    upstream u {
        zone ...;
        ...
        server example.com resolve;
    }
}

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,251138,251138#msg-251138
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2014-06-25 02:33
(Received via mailing list)
Hello!

On Tue, Jun 24, 2014 at 08:18:04PM -0400, badtzhou wrote:

> monitors changes of the IP addresses that correspond to a domain name of the
> server, and automatically modifies the upstream configuration without the
> need of restarting nginx (1.5.12).
> In order for this parameter to work, the resolver directive must be
> specified in the http block. Example:

You've missed this part above it:

: Additionally, the following parameters are available as part of
: our commercial subscription:

http://nginx.org/en/docs/http/ngx_http_upstream_mo...

--
Maxim Dounin
http://nginx.org/
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.