Syntax: | resolver
|
---|---|
Default: | — |
Context: | stream , server |
This directive appeared in version 1.11.3.
Configures name servers used to resolve names of upstream servers into addresses, for example:
resolver 127.0.0.1 [::1]:5353;
An address can be specified as a domain name or IP address, and an optional port. If port is not specified, the port 53 is used. Name servers are queried in a round-robin fashion.
By default, nginx will look up both IPv4 and IPv6 addresses while resolving. If looking up of IPv6 addresses is not desired, the ipv6=off
parameter can be specified.
By default, nginx caches answers using the TTL value of a response. The optional valid
parameter allows overriding it:
resolver 127.0.0.1 [::1]:5353 valid=30s;
Before version 1.11.3, this directive was available as part of our commercial subscription.
Please login to continue.