首页 > 代码库 > nginx [emerg] socket() []80 failed (97 Address family not supported by protocol)

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

1、nginx报错信息

早上通过LNMP部署owncloud 10.0.2的云盘环境,修改nginx配置文件后,重启报错:
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)


2、分析并解决报错

看到 socket() [::]:80 failed,第一反应就是好像与IPV6有关,Address family not supported by protocol也进一步印证了我的想法,如是想到查看nginx配置文件

修改nginx的配置文件:

vim /etc/nginx/nginx.conf

如果不知道nginx的配置文件在哪,可以通过find命令或者rpm -ql nginx(rpm形式安装的话)进行查找nginx.conf

# rpm -ql nginx|grep nginx.conf
/etc/nginx/nginx.conf
/etc/nginx/nginx.conf.default

重新启动nginx,告警消失



本文出自 “冰冻vs西瓜” 博客,请务必保留此出处http://molewan.blog.51cto.com/287340/1942907

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