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

2016-12-15 11:33:47

centos6.5环境

修改nginx配置文件后,重启报错:

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

解决办法:

vim /etc/nginx/conf.d/default.conf

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


改为:
listen       80;
 

#listen       [::]:80 default_server;

 

重新启动nginx即可,网上说的那种kill掉nginx进程和ipv6 on的方法不适用

发表评论:

Powered by PHP 学习者(mail:517730729@qq.com)

原百度博客:http://hi.baidu.com/ssfnadn

备案号:闽ICP备17000564号-1

开源中国 PHPCHINA