欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

CentOS 启动 Nginx 报错 97: Address family not supported by protocol 的解决办法

程序员文章站 2022-05-26 15:13:57
...

Starting 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

sudo service nginx restart

参考资料:

1、nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
https://blog.csdn.net/reblue520/article/details/52799500