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 ...
随机推荐
- python字符串常用方法、分割字符串等
一.字符串的常用方法 1.str.capitalize() 字符串首字母大写 2.str.center() 把字符串居中 3.str.isalnum() 判断字符串是否含有英文.数字,若有英文和数 ...
- 题解 P2350 【[HAOI2012]外星人】
题目链接 还是本宝宝写题解的一贯习惯 $ :$ 先吐槽吐槽这道题$……$ 相信不少同学第一眼一定没有看懂题.(因为我也没看懂) ~~初中~~数学知识: 对于函数 $ f(x)$ 有 $f^{-1}(x ...
- Optimizing and caching browser bundles...
扎心了,老铁!!! 他妈的,弄了几天都是卡在这里!!上网查了一下.说是我的内存不够,好吧.我慢慢等,然而让我等了好几天都没什么反应..两天了,一直卡在这里.今天在虚拟机也是发狠了. 我直接把虚拟机的内 ...
- uiautomator中文输入
步骤一: 下载UTF7 IME的整个项目 https://github.com/sumio/uiautomator-unicode-input-helper 选择“Download ZIP”打包下载 ...
- LeetCode记录之9——Palindrome Number
LeetCode真是个好东西,本来闲了一下午不想看书,感觉太荒废时间了就来刷一道题.能力有限,先把easy的题目给刷完. Determine whether an integer is a palin ...
- Rebranding(模拟+思维)
The name of one small but proud corporation consists of n lowercase English letters. The Corporation ...
- 石头剪刀布(2019Wannafly winter camp day3 i) 带权并查集+按秩合并 好题
题目传送门 思路: 按照题意描述,所有y挑战x的关系最后会形成一棵树的结构,n个人的总方案数是 3n 种,假设一个人被挑战(主场作战)a次,挑战别人(客场)b次,那么这个人存活到最后的方案数就是3n* ...
- BZOJ - 1941 最远估价
题意:求给出的所有点的最远点减最近点的最小差值 KD树的最远估价和最近估价略微不同,直接找最远垂线,反正xjb改一下就过了 #include<bits/stdc++.h> #define ...
- PHP报错
php.ini ; 错误日志 log_errors = On ; 显示错误 display_errors = Off ; 日志路径 error_log = "/usr/local/lnmp/ ...
- linux Ubuntu14.04 python(c++版本) tesorflow(python版本)c++
一.环境变量配置: export M2_HOME=/home/ustcjing/Maven/apache-maven- export JAVA_HOME=/usr/lib/jvm8/java expo ...