Nginx起動時にエラー「80 failed (97: Address family not supported by protocol)」
事象
dc_proxy | nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
原因
proxy/etc/nginx/nginx.conf
server個所抜粋。以下の「listen [::]:80 default_server;」が原因。 IPv6のところをコメントアウトする といいらしい。
参考サイト: https://akira-junkbox.blogspot.com/2016/02/nginx80-failed-97-address-family-not.html
server { listen 80 default_server; listen [::]:80 default_server; server_name _; root /usr/share/nginx/html; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; location / { } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } }
対応
「listen [::]:80 default_server; 」をコメントアウト
server { listen 80 default_server; #listen [::]:80 default_server; server_name _; root /usr/share/nginx/html; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; location / { } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } }