CentOS 6 Nginx启动失败的解决方法 [emerg] socket() [::]:80 failed

CentOS 6.5 Nginx启动服务提示以下错误:

[[email protected]*********** ~]# service nginx start
Starting nginx: nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
                                                           [FAILED]

解决办法

vi /etc/nginx/conf.d/default.conf

找到

listen       80 default_server;
listen       [::]:80 default_server;

修改为

listen       80;
#listen       [::]:80 default_server;

最后重启一下Nginx服务

[[email protected] ~]# service nginx start
Starting nginx:                                            [  OK  ]

Post Comment