标签:服务启动 config ima fail test 配置文件 服务 src yum
环境:centos 6.9,yum安装的nginx,启动报错
[root@lnmp ~]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
nginx: configuration file /etc/nginx/nginx.conf test failed
vi /etc/nginx/nginx.conf
没发现要修改的端口信息
listen 80;
仔细查看nginx的主配置文件发现include选项,包含了nginx的其他配置文件
然后继续查看发现:
vim /etc/nginx/conf.d/default.conf 将: listen 80 default_server; listen [::]:80 default_server; 改为: listen 80; #listen [::]:80 default_server;
启动nginx就成功了。
97: Address family not supported by protocol,nginx服务启动失败
标签:服务启动 config ima fail test 配置文件 服务 src yum
原文地址:https://www.cnblogs.com/yihr/p/9588964.html