mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 05:30:45 +00:00
nginx: Don't resolve with IPv6, only cache for 60s
This commit updates the default resolver configuration for Nginx servers to not attempt to resolve IPv6 addresses, and only holds resolved IPs for a maximum of 60 seconds, in order to avoid issues with stale cache.
This commit is contained in:
parent
79e742d4b7
commit
85d4b221f4
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Set NGINX resolver from system-wide configuration.
|
||||
awk '/^nameserver/ {printf "resolver %s;\n", $2; exit}' /etc/resolv.conf > /etc/nginx/resolver.conf
|
||||
awk '/^nameserver/ {printf "resolver %s valid=60s ipv6=off;\n", $2; exit}' /etc/resolv.conf > /etc/nginx/resolver.conf
|
||||
|
||||
# Start NGINX as foreground process.
|
||||
nginx -g 'daemon off;'
|
||||
|
Loading…
Reference in New Issue
Block a user