nginx: [emerg] socket() [::]:8080 failed (97: Address family not supported by protocol)

error nginx

When starting nginx, you may get the following error.

nginx: [emerg] socket() [::]:8080 failed (97: Address family not supported by protocol)

This indicates that the server’s IPv6 is disabled, causing the service to fail owing to an unsupported address family.

  • Search for the following directive in the NGINX configuration file to resolve this error.

# listen [::]:80;

  • Replace the above with the following.

listen 80;

Leave a Reply