前言

记录NGINX的错误

错误

nginx: [emerg] unknown directive "erver" in /usr/local/nginx/conf/vhost/dev.api.ecdpower.net.conf:2

[root@ecs-75fb-0531684 vhost]# /usr/local/nginx/sbin/nginx -t
nginx: [emerg] unknown directive "erver" in /usr/local/nginx/conf/vhost/dev.xxx.net.conf:2
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed

报错很明显,这个配置文件的第2行,但是坑爹的是第一行的server错了,修改下就好了

[root@ecs-75fb-0531684 vhost]# /usr/local/nginx/sbin/nginx -t
nginx: [warn] conflicting server name "140.xx.11" on 0.0.0.0:40001, ignored
nginx: [warn] conflicting server name "140.xx.11" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "140.xx.11" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "140.xx.11" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "140.xx.11" on 0.0.0.0:443, ignored
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

nginx:post请求变为get

1. 设置了所有http请求转为https请求造成的,去除后就好了
2. return 307 https://<需跳转地址>$request_uri;

nginx: [emerg] duplicate upstream "bakend" in /usr/local/nginx/conf/./vhost/xxxxxx.conf:1

多个配置都用了bakend这个名称造成的,将其他的修改下就阔以了

open() "/var/run/nginx.pid" failed (2: No such file or directory)

进入到/usr/local/nginx/logs/查看error.log可以看到具体的报错信息.

根据报错找到对应的vhost,查看配置后得知,配置中的写入日志的目录没有存在,将错误的日志路径改为正确的即可,当然别忘记reload或者restart

./configure: error: the HTTP gzip module requires the zlib library.

完整错误信息

./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using –without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using –with-zlib=<path> option.

解决方法

yum install -y zlib-devel

The plain HTTP request was sent to HTTPS port

完整错误信息

The plain HTTP request was sent to HTTPS port. Sorry for the inconvenience.
Please report this message and include the following information to us.
Thank you very much!
`` 解决方法

监听的443端口后面加上ssl并添加相应的证书

server {

listen 80;

listen 443 ssl;

}

Nginx——报错汇总的更多相关文章

  1. Nginx报错汇总

    1.     Nginx 无法启动解决方法 在查看到 logs 中报了如下错误时: 0.0.0.0:80 failed (10013: An attempt was made to access a ...

  2. nginx 报错 upstream timed out (110: Connection timed out)解决方案【转】

    转自 nginx 报错 upstream timed out (110: Connection timed out)解决方案 - 为程序员服务http://outofmemory.cn/code-sn ...

  3. nginx报错:./configure: error: C compiler cc is not found, gcc 是已经安装了的

    源码安装nginx报错,找不到gcc,但是实际上gcc是存在的,如下: # ./configure checking for OS + Linux -.el7.x86_64 x86_64 checki ...

  4. Ambari集成Kerberos报错汇总

    Ambari集成Kerberos报错汇总 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.查看报错的配置信息步骤 1>.点击Test Kerberos Client,查看相 ...

  5. Python_环境部署及报错汇总(0)

    一.安装Anaconda Anaconda是一个开源的包.环境管理器,可以用于在同一个机器上安装不同版本的软件包及其依赖,并能够在不同的环境之间切换. Anaconda包括Conda.Python以及 ...

  6. nginx报错zero size shared memory zone one

    为了限速,在虚拟主机中加上了一个参数:limit_conn one 1:结果导致重启nginx报错: zero size shared memory zone "one"解决办法是 ...

  7. nginx报错:403 Forbidden 并且访问首页index.php是下载文件的状态

    nginx报错:403 Forbidden 并且访问首页index.php是下载文件的状态,不能正常解析php 系统有其他两个站访问是正常的 看日志没有看到明显的错误 搜索了下: 答案如下: php的 ...

  8. Centos下yum安装Nginx报错 No package nginx available.

    在Centos6下使用yum安装Nginx报错 解决方案: yum install epel-release

  9. ElementUI——报错汇总

    前言 elementUI的报错汇总 错误 please transfer a valid prop path to form item! vue.esm.js?c5de:628 [Vue warn]: ...

随机推荐

  1. Docker 容器内无法通过 HTTP 访问外网

    现象 内/外网 IP 和 域名 可以 ping 通 容器内无法访问宿主机所在内网及外网的 Web 服务(404) 通过 curl 查看返回头信息感觉是所有 Web 请求被中转到一个固定的 Nginx ...

  2. Consumer clientId=consumer-1, groupId=console-consumer-950] Connection to node -1 could not be

    kafka创建主题的ip地址最好用实际ip,不要用localhost https://blog.csdn.net/getyouwant/article/details/79000524

  3. 【剑指offer】平衡二叉树

    题目描述 输入一棵二叉树,判断该二叉树是否是平衡二叉树. 分析:采用后序遍历的方式判断左右子树的高度差是否大于1 class Solution { public: bool flag; int f(T ...

  4. C指针的一些小细节

    1  int *c;*c=4-->int *c;int b;c=&b;*c=4; 在使用指针之前,一定要将其初始化,当然,如果是赋予一个地址,就相当于使用的同时就进行了初始化.

  5. linux设置定时任务的方法(自己总结)

    Linux设置定时任务步骤 linux设置定时任务的关键字是:crontab 1:查看现在已经有的定时任务的命令是  crontab -l,执行命令如下图: 2:新建定时任务的命令是:crontab ...

  6. C#实现AES加密解密

    AES   AES 高级加密标准(英语:Advanced Encryption Standard,缩写:AES),在密码学中又称Rijndael加密法 Rijndael(读作rain-dahl)是由美 ...

  7. Java web服务端参数校验Javax.validation (springboot)

    一.基本使用 Javax.validation是spring集成自带的一个参数校验接口.可通过添加注解来设置校验条件. 下面以springboot项目为例进行说明.创建web项目后,不需要再添加其他的 ...

  8. Java知识回顾 (13)序列化

    本资料来自于runoob,略有修改. 整个过程都是 Java 虚拟机(JVM)独立的,也就是说,在一个平台上序列化的对象可以在另一个完全不同的平台上反序列化该对象. 类 ObjectInputStre ...

  9. 内部属性[[class]]

    1. 对象的[[class]]属性 所有typeof返回值为“object”的对象(如数组)都包含一个内部属性[[class]],这个属性无法直接访问,一般通过Object.prototype.toS ...

  10. Vue学习之webpack调用第三方loader(十五)

    ---恢复内容开始--- 一.webpack 默认只能打包处理 JS 类型的文件,无法处理 其他的非  JS 类型的文件: 如果非要处理 非 JS 类型的文件,我们需要手动安装一些 合适 第三方 lo ...