1、启动nginx服务报错

环境: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

2、尝试修改配置文件

vi /etc/nginx/nginx.conf

没发现要修改的端口信息

listen 80;
仔细查看nginx的主配置文件发现include选项,包含了nginx的其他配置文件

然后继续查看发现:

3、解决办法

   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服务启动失败的更多相关文章

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

    环境:Centos6.5 行为:安装nginx 问题: nginx: [emerg] socket() [::]: failed (: Address family not supported by ...

  2. 阿里云ECS在CentOS 6.9中使用Nginx提示:nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)的解决方法

    说明: 1.[::]:80这个是IPv6的地址. 2.阿里云截至到今天还不支持IPv6. 解决方式: 1.普通解决方式:开启IPv6的支持,不过这个方法在阿里云行不通. vim /etc/nginx/ ...

  3. linux中nfs启动报rpcbind.socket failed to listen on sockets: Address family not supported by protocol

    1.systemctl start rpcbind.service 报错: [root@autodeploy ~]# journalctl -xe -- Support: http://lists.f ...

  4. pm2命令,端口查询,mongodb服务启动,nginx服务启动,n模块的使用,搭建nodejs服务器环境,搭建oracledb服务器环境 linux的环境搭建

    pm2命令 pm2 ls //查询pm2 启动的列表 pm2 start app.js //启动文件 pm2 restart app //重启项目 pm2 logs app //监控项目执行日志打印 ...

  5. Nginx系列~Nginx服务启动不了

    Nginx服务有时起动不了了,原因是80端口为其它应用程序占用了,这时,我们需要查看是哪个程序占用了它,可能是IIS的某个站点,或者Tomat,Apache等,都有可能,所以,我们需要查看一下电脑80 ...

  6. 解决nginx启动时域名解析失败而导致服务启动失败的问题

    问题: nginx启动或者reload的时候,会对proxy_pass后面的域名进行DNS解析,如果解析失败,启动就会失败或者reload失败. 我们是to B的产品,客户的环境可能是不通公网的,因此 ...

  7. 案例十:shell编写nginx服务启动程序

    使用源码包安装的Nginx没办法使用"service nginx start"或"/etc/init.d/nginx start"进行操作和控制,所以写了以下的 ...

  8. disabling IPv6 name/address support: Address family not supported by protocol

    禁用IPv6 后影响邮件发送设置 vim /etc/postfix/main.cf # Enable IPv4, and IPv6 if supported inet_protocols = all

  9. Nginx服务启动脚本

    #!/bin/sh # chkconfig: 2345 40 98 # description: Start/Stop Nginx server path=/application/nginx/sbi ...

随机推荐

  1. idea生成springBoot 报错403

    问题: idea创建springboot失败 Initialization failed Cannot download 'https://start.spring.io': Status: 403 ...

  2. esper(2)-事件类型

    1.pojo package com.ebc.eventtype.pojo.pojo1; import cn.hutool.core.collection.CollUtil; import com.e ...

  3. poj 1001 字符串乘法以及处理精度问题

    #include<iostream> #include<cstring> using namespace std; int main() { string r; int n,d ...

  4. 研磨设计模式学习笔记4--单例模式Signleton

    需求:加载配置文件,由于配置文件全局唯一,所以不用过多对象,建一个就可以了. 优点:单例模式本质就是为了控制实例数目. 一.饿汉式 public class Singleton { private S ...

  5. Jquery ValidationEngine 修改验证提示框的位置

    <!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  6. ajax动态给select赋值

    <select name="elements" id="ele" style="width: 145px;">          ...

  7. tencent intern learning

    gslb全局负载均衡   (负载均衡的问题就是某些session保存在某台服务器中,这个用户就只能用那台服务器服务了) jwt vs 传统cookies & session  (jwt类似于公 ...

  8. Unity [SerializeField]

    在Unity3d中Unity3D 中提供了非常方便的功能可以帮助用户将 成员变量 在Inspector中显示,并且定义Serialize关系. 也就是说凡是显示在Inspector 中的属性都同时具有 ...

  9. 性能测试工具LoadRunner25-LR之常用性能指标计算公式

    1.吞吐量计算公式 定义:指单位时间内系统处理用户的请求数 从业务角度看,吞吐量可以用:请求数/秒.页面数/秒.人数/天或处理业务数/小时等单位来衡量. 从网络角度看,吞吐量可以用:字节/秒来衡量 对 ...

  10. keepalived双机热备实现故障时发送邮件通知

    目前项目已经采用nginx来实现负载均衡,但是nginx调度器只有一台,上次还意外的down机一次,导致整个服务应用全部瘫痪,这次准备再加一个调度器来实现站点高可用性,也就是常说的双机热备了. mas ...