Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Address family not supported by protocol: nginx error  (Read 28855 times)

0 Members and 1 Guest are viewing this topic.

nandulalr

  • Guest
Address family not supported by protocol: nginx error
« on: February 25, 2018, 12:51:30 am »
Code: [Select]
# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
nginx: configuration file /etc/nginx/nginx.conf test failed

The above error indicates that ipv6 is disabled on your server, hence service is and failed due to unsupported address family.

To resolve this issue, we need to edit the nginx configuration file, and comment out the below line(add # in front of it):

listen [::]:80;

Then restart the nginx service.

Code: [Select]
/etc/init.d/nginx restart

Code: [Select]
# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful