mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 21:50:46 +00:00
Alex Palaistras
85d4b221f4
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.
8 lines
244 B
Bash
Executable File
8 lines
244 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Set NGINX resolver from system-wide configuration.
|
|
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;'
|