阿里云ECS 系统为 CentOS 6.8 64位

使用 yum install nginx 安装完成后,执行 nginx 启动服务,提示:

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

这是因为服务器不支持IPV6的地址导致的。

解决方法:

编辑Nginx的配置文件:

 vi /etc/nginx/conf.d/default.conf
将文件中的一行配置注释掉:

listen [::]:80 default_server;
注释方法:

在行的前面加#号,如下图:

 阿里云机器上执行 locusts 命令出现 OSError: [Errno 97] Address family not supported by protocol...

 

保存之后再启动Nginx就Ok了。
---------------------
作者:微wx笑
来源:CSDN
原文:https://blog.csdn.net/testcs_dn/article/details/82777033
版权声明:本文为博主原创文章,转载请附上博文链接!

相关文章:

  • 2022-12-23
  • 2021-06-12
  • 2021-06-16
  • 2022-01-23
  • 2021-10-14
  • 2022-12-23
  • 2021-12-16
  • 2022-12-23
猜你喜欢
  • 2021-08-24
  • 2021-09-17
  • 2022-12-23
  • 2022-12-23
  • 2021-10-10
相关资源
相似解决方案