February 2018
Beginner to intermediate
348 pages
9h 40m
English
Context: http, server, and location
Specifies the name servers that should be employed by Nginx to resolve hostnames to IP addresses and vice-versa. DNS query results are cached for some time, either by respecting the TTL provided by the DNS server, or by specifying a time value to the valid argument.
If more than one DNS server is specified, Nginx will query them using a round-robin algorithm.
Syntax: one or more IPv4 or IPv6 addresses, valid=Time value, ipv6=on|off
Default value: None (system default)
resolver 127.0.0.1; # use local DNS resolver 8.8.8.8 8.8.4.4 valid=1h; # use Google DNS and cache results for 1 hour
Read now
Unlock full access