Nginx的各种报错总结
1、Nginx安装过程报错
错误一:软件依赖包未正确安装问题---PCRE依赖包没有安装
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option. 解决方法:yum install pcre pcre-devel -y
错误二:软件依赖包未正确安装问题---OPENSSL依赖包没有安装
./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=<path> option. 解决方法:yum install openssl openssl-devel -y
错误三:编译安装pcre编译软件时,gcc不全导致报错(使用yum安装不存在此问题)。
报错信息如下:
[root@gjlin2 pcre-8.30]# make && make install
make all-am
make[l]: Entering directory 7h〇me/gjlin/tools/pcre-8.30*
CXX pcrecpp.lo
libtool: compile : unrecognized option '-DHAVE_CONFIG_H'
libtool:compile : Try 'libtool --help' for more information.
make[l]:***[pcrecpp.lo]错误
make[l]:Leaving directory '/home/gjlin/tools/pcre-8.30'
make : *** [all]错误 解答:执行"yum -y install gcc-c++"命令安装gcc-c++依赖包。
2、Nginx启动过程中报错
错误一:nginx软件重复启动产生的错误信息
[root@web01 nginx-1.10.]# /application/nginx/sbin/nginx
nginx: [emerg] bind() to 0.0.0.0: failed (: Address already in use)
nginx: [emerg] bind() to 0.0.0.0: failed (: Address already in use)
nginx: [emerg] bind() to 0.0.0.0: failed (: Address already in use)
nginx: [emerg] bind() to 0.0.0.0: failed (: Address already in use)
nginx: [emerg] bind() to 0.0.0.0: failed (: Address already in use)
nginx: [emerg] still could not bind()
解决方法:nginx软件已经启动无需反复启动,如果需要重新启动需要停止nginx进程或者用reload方式进行重启
错误二:403报错
- 服务阻止客户端访问
- 服务端站点目录中,没有指定首页文件信息
错误三:启动 Nginx 时如下报错"nginx:[emerg]getpwnam(“nginx”)failed"
解答:这是因为没有对应的Nginx服务用户,执行useradd nginx -s /sbin/nologin -M创建Nginx用户即可。为了让读者理解问题,重现上述错误过程,命令如下:
[root@web tools]# pkill nginx [root@web tools]# userdel nginx [root@web tools]# /application/nginx/sbin/nginx nginx: [emerg] getpwnam(Mnginx") failed [root@web tools]# useradd nginx -s /sbin/nologin -M [root@web tools]# /application/nginx/sbin/nginx
Nginx的各种报错总结的更多相关文章
- nginx集群报错“upstream”directive is not allow here 错误
nginx集群报错“upstream”directive is not allow here 错误 搭建了一个服务器, 采用的是nginx + apache(多个) + php + mysql(两个) ...
- Nginx配置SSL报错 nginx: [emerg] unknown directive "ssl"
Nginx配置SSL报错 nginx: [emerg] unknown directive "ssl" 出现如图所示错误,处理办法如下 去nginx解压目录下执行 ./co ...
- 编译nginx的时候报错 需要安装PCRE
./configure --prefix=/mynginx/ 本地编译nginx的时候 报错 提示需要安装PCRE 错误信息: ./configure: error: the HTTP rewrite ...
- Linux make nginx 的时候报错
报错如下: `conf/koi-win' and `/usr/local/nginx/conf/koi-win' are the same file 原因: 可能在编译 nginx 的时候步骤不对 ...
- springclould nginx转发 websocket400报错问题
之前一直找原因一直围绕着nginx转发的问题 说头信息没设置全 然后nginx配置文件上加了这些 #http块加以下几行: map $http_upgrade $connection_upgrade ...
- nginx关闭php报错页面显示
默认情况下nginx是会显示php的报错的,如果要关闭报错显示,需要在/usr/local/php7/etc/php-fpm.d/www.conf文件里面设置,貌似默认情况下在php.ini关闭没效果 ...
- nginx反向代理 报错:Error during WebSocket handshake: Unexpected response code: 403
遇到nginx报错:websocket wss failed: Error during WebSocket handshake: Unexpected response code: 403 serv ...
- thinkphp3.2.3 nginx 连接mysql 报错 new PDO 异常
在 php.ini 里重新指定mysql.sock 路径 pdo_mysql.default_socket=/Applications/XAMPP/xamppfiles/var/mysql/mysql ...
- 【转】解决编译安装NGINX时make报错
编译参数:--[root@localhostnginx-1.4.6]#./configure--user=nginx--group=nginx--prefix=/usr/local/nginx--wi ...
随机推荐
- NSEnumerator迭代器
前言 Xcode 7 对系统中常用的一系列容器类型都增加了泛型支持(),有了泛型后就可以指定容器类中对象的类型了. 假如向泛型容器中加入错误的对象,编译器会报警告. __covariant:协变性,子 ...
- 第0篇 Python前言
1.注释 1)注释的作用: 用自己熟悉的语言在代码中添加注释,方便后期自己查看和理解,也方便其他人查看和理解代码含义. 2)单行注释: 以#号开头,#后面的所有内容均不会被程序执行,起到辅助说明的作用 ...
- 日期 Date()
1.Date 对象用于处理日期和时间.创建 Date 对象的语法:var myDate=new Date()Date 对象会自动把当前日期和时间保存为其初始值.2.参数形式有以下5种: new Dat ...
- Python爬虫从入门到放弃 之 Scrapy框架中Download Middleware用法
这篇文章中写了常用的下载中间件的用法和例子.Downloader Middleware处理的过程主要在调度器发送requests请求的时候以及网页将response结果返回给spiders的时候,所以 ...
- win7下钩子失效解决方案
win7键盘钩子失效解决方法:1.win开始右键+r(运行) 2.将其输入regedit.exe(注册表管理器),回车打开注册表管理器 3.进入HKEY_LOCAL_MACHINE4.进入到SYS ...
- kibana安装汉化包
kibana安装汉化包其实很简单!但要找到汉化包可能就很麻烦了.我这里提供了6.2的版本的汉化包!至于能不能在其他版本用,我就没试过了.但6.2的kibana本人亲测.没问题!!!! 下载——解压.这 ...
- <!-- -->是HTML的注释标签js,css注释
<!-- -->是HTML的注释标签 js,css:单行注释以 // 开头. 多行注释以 /* 开始,以 */ 结尾. web大作业(Vip视频解析) <!-- 这个网页是vip视频 ...
- python学习之路---day06
一:is 和 == 的区别 01)a b 两个变量 is 是比较变量的内存地址,如果地址相等,则返回True,如果不相等,则返回False == 是比较变量两边内容是否一样,如果一样则返回True,不 ...
- 洛谷 P2486 [SDOI2011]染色(树链剖分+线段树)
题目链接 题解 比较裸的树链剖分 好像树链剖分的题都很裸 线段树中维护一个区间最左和最右的颜色,和答案 合并判断一下中间一段就可以了 比较考验代码能力 Code #include<bits/st ...
- POJ_2480 Longge's problem【积性函数+欧拉函数的理解与应用】
题目: Longge is good at mathematics and he likes to think about hard mathematical problems which will ...