Nginx——报错汇总
前言
记录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——报错汇总的更多相关文章
- Nginx报错汇总
1. Nginx 无法启动解决方法 在查看到 logs 中报了如下错误时: 0.0.0.0:80 failed (10013: An attempt was made to access a ...
- nginx 报错 upstream timed out (110: Connection timed out)解决方案【转】
转自 nginx 报错 upstream timed out (110: Connection timed out)解决方案 - 为程序员服务http://outofmemory.cn/code-sn ...
- nginx报错:./configure: error: C compiler cc is not found, gcc 是已经安装了的
源码安装nginx报错,找不到gcc,但是实际上gcc是存在的,如下: # ./configure checking for OS + Linux -.el7.x86_64 x86_64 checki ...
- Ambari集成Kerberos报错汇总
Ambari集成Kerberos报错汇总 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.查看报错的配置信息步骤 1>.点击Test Kerberos Client,查看相 ...
- Python_环境部署及报错汇总(0)
一.安装Anaconda Anaconda是一个开源的包.环境管理器,可以用于在同一个机器上安装不同版本的软件包及其依赖,并能够在不同的环境之间切换. Anaconda包括Conda.Python以及 ...
- nginx报错zero size shared memory zone one
为了限速,在虚拟主机中加上了一个参数:limit_conn one 1:结果导致重启nginx报错: zero size shared memory zone "one"解决办法是 ...
- nginx报错:403 Forbidden 并且访问首页index.php是下载文件的状态
nginx报错:403 Forbidden 并且访问首页index.php是下载文件的状态,不能正常解析php 系统有其他两个站访问是正常的 看日志没有看到明显的错误 搜索了下: 答案如下: php的 ...
- Centos下yum安装Nginx报错 No package nginx available.
在Centos6下使用yum安装Nginx报错 解决方案: yum install epel-release
- ElementUI——报错汇总
前言 elementUI的报错汇总 错误 please transfer a valid prop path to form item! vue.esm.js?c5de:628 [Vue warn]: ...
随机推荐
- zabbix 后台数据库清除数据
alerts 表 problem 表 escalations 表 events 表 event_recovery表 对 这些表进行清除 防止不停发送邮件 -- alerts table rebuil ...
- 翻书shader
//把下面的shader挂载到plane上,调节_Angle Shader "Unlit/PageTurning"{ Properties { _Color ("Colo ...
- 【剑指offer】1+….+n,不能使用相关关键字
题目描述 求1+2+3+...+n,要求不能使用乘除法.for.while.if.else.switch.case等关键字及条件判断语句(A?B:C). 分析:可以使用递归! class Soluti ...
- vue 在发送axios请求时数据渲染问题
这是我请求的json格式的数据 一开始在vue用普通的数据渲染,更改为vue后使用v-for 发现没办法渲染上去了. obj.data就是以上数据. 必须加上这三行给this随意赋个值,神奇的事情就会 ...
- 第1课,python输出,输入,变量,运算
课程内容: 为什么要学习python 如何学python 实践体验 图片来源网络分享 为什么要学python: 简单 (设计如此) 强大(因为开源,有库) 如何学习python: 变量 --> ...
- 【leetcode】501. Find Mode in Binary Search Tree
class Solution { public: vector<int> modes; int maxCnt = 0; int curCnt = 0; int curNum = 0; ve ...
- flink checkpoint状态储存三种方式选择
Flink 提供了三种可用的状态后端:MemoryStateBackend,FsStateBackend,和RocksDBStateBackend. MemoryStateBackend Memory ...
- 【LEETCODE】71、验证二叉树的前序序列化
简单粗暴,代码有待优化,不过自己独立完成,没有参考任何材料,还是比较满意的 package y2019.Algorithm.stack.medium; import java.util.Stack; ...
- unity---为什么用Time.deltaTime * speed 表示每秒移动的距离的理解
Time.deltaTime:代表时间增量,即从上一帧到当前帧消耗的时间, 这个值是动态变化的. dt 表示 deltaTime. 假如 1s渲染10帧,沿X轴方向的移动速度 speed = 10m/ ...
- lcd12864菜单
最近一段时间学习了一下lcd12864屏幕的驱动(本人使用的是带字库的st7920驱动芯片). 1.该屏幕可以是串行驱动,或者并行驱动. 2.该屏幕的显示分为2部分,文字显示区DDRAM,图像显示区G ...