Sometimes it might happens that, when you try to start Nginx on CentOS there might be an error such as:
nginx: [emerg] bind() to [xxxx:xxx:xxx:xxx::x]:80 failed (99: Cannot assign requested address)
This typically happen if there have been disabled IPv6 on the system. This issue could be solved by:
1. Setting the IPv4 manually into the nginx.conf
configuration file under /etc/nginx
2. Or either enabling IPv6 by removing the restriction line code (e.g. net.ipv6.conf.all.disable_ipv6 = 1
) from /etc/sysctl.conf
and reboot or update setting by executing this: sysctl -p