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]: ...
随机推荐
- Ng-Alain-mock 运用
Ng-Alain Ng-Alian 是基于 Antd 实现的一个前端框架.它基于 Angular 和 NG-ZORRO,在此基础上进行进一步封装,是中后台的前端解决方案,为我们提供更多通用性业务模块, ...
- Git 删除所有历史提交记录方法
Git 删除所有历史提交记录方法 切换分支 git checkout --orphan latest_branch 添加所有文件 git add -A 提交更改 git commit -am &quo ...
- linux安装 uwsgi 测试 test.py 不显示hello world 的解决办法
一般部署项目到服务器,会安装uwsgi,但是很多教程在安装它的时候会让你测试一下安装好了没,于是就有很多像我一样懵逼的少年掉进一个坑里出不来,很久.很久... 那就是最后浏览器输入ip:8000端口后 ...
- cloudera cdh6.3 离线安装 经典大数据平台视频教程(含网盘下载地址)
cdh6.3企业级大数据视频教程 链接:https://pan.baidu.com/s/1bLGrIwzpFQB-pQRb6KOmNg 提取码:i8h8 系统和软件版本1,操作系统:Centos7.6 ...
- spark提交任务详解
- 上传docker镜像到阿里云镜像源
阿里云docker镜像配置 阿里云用户名可以使用淘宝系的,或者新注册都行. a. 配置阿里云的镜像加速器:加速器 然后在线上创建`镜像仓库`,需要设置`命名空间`和`仓库名称`,然后接着操作下面的步骤 ...
- Window中C++进行精确计时的方法
嗯,程序员一个永恒的追求就是性能吧? 为了衡量性能,自然需要计时. 奈何无论C标准库还是C++标准库,因为通用性的考虑,其time API精度都不高.基本都是毫秒级的. 所以如果要真正精确地衡量程序的 ...
- java之基本技术点总结博客
泛型的理解 聊一聊-JAVA 泛型中的通配符 T,E,K,V,? 类,接口的继承和实现的规则 类与类之间只能继承,并且是单继承,可以多级继承 类与接口之间可以实现,一个类可以实现多个接口 接口和接口之 ...
- JavaScript字符串转数值
JavaScript字符串转数值:方法主要有三种 转换函数.强制类型转换.利用js变量弱类型转换. 1. 转换函数 js提供了parseInt()和parseFloat()两个转换函数.前者把值转换成 ...
- wamp环境下配置https证书后,网站内容访问受限
wamp环境下配置https证书后,网站内容访问受限,点击首页链接标签后报错,大致意思是没有权限进行操作. 解决方法:打开apache的http.conf(位置大致如下:项目所在目录\bin\apac ...