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的各种报错总结的更多相关文章

  1. nginx集群报错“upstream”directive is not allow here 错误

    nginx集群报错“upstream”directive is not allow here 错误 搭建了一个服务器, 采用的是nginx + apache(多个) + php + mysql(两个) ...

  2. Nginx配置SSL报错 nginx: [emerg] unknown directive "ssl"

    Nginx配置SSL报错 nginx: [emerg] unknown directive "ssl"     出现如图所示错误,处理办法如下 去nginx解压目录下执行 ./co ...

  3. 编译nginx的时候报错 需要安装PCRE

    ./configure --prefix=/mynginx/ 本地编译nginx的时候 报错 提示需要安装PCRE 错误信息: ./configure: error: the HTTP rewrite ...

  4. Linux make nginx 的时候报错

    报错如下: `conf/koi-win' and `/usr/local/nginx/conf/koi-win' are the same file   原因: 可能在编译 nginx 的时候步骤不对 ...

  5. springclould nginx转发 websocket400报错问题

    之前一直找原因一直围绕着nginx转发的问题 说头信息没设置全 然后nginx配置文件上加了这些 #http块加以下几行: map $http_upgrade $connection_upgrade ...

  6. nginx关闭php报错页面显示

    默认情况下nginx是会显示php的报错的,如果要关闭报错显示,需要在/usr/local/php7/etc/php-fpm.d/www.conf文件里面设置,貌似默认情况下在php.ini关闭没效果 ...

  7. nginx反向代理 报错:Error during WebSocket handshake: Unexpected response code: 403

    遇到nginx报错:websocket wss failed: Error during WebSocket handshake: Unexpected response code: 403 serv ...

  8. thinkphp3.2.3 nginx 连接mysql 报错 new PDO 异常

    在 php.ini 里重新指定mysql.sock 路径 pdo_mysql.default_socket=/Applications/XAMPP/xamppfiles/var/mysql/mysql ...

  9. 【转】解决编译安装NGINX时make报错

    编译参数:--[root@localhostnginx-1.4.6]#./configure--user=nginx--group=nginx--prefix=/usr/local/nginx--wi ...

随机推荐

  1. 关于函数传参的其他问题(const形参实参/可变形参)

    const 形参和实参 当形参是 const 变量时,实参是 const 或者不是 const 变量都可以. 实参初始化形参时会忽略掉顶层 const: void gel(const int a){ ...

  2. luoguP2982 [USACO10FEB]慢下来Slowing down

    https://www.luogu.org/problemnew/show/P2982 这题你写个树剖当然可以做,但是我们还有一种更简单的方法,使用 dfs 序 + 树状数组即可 考虑一只牛到了自己的 ...

  3. 洛谷P2765 魔术球问题(最大流)

    传送门 %%%KSkun大佬 话说明明是网络流……这题竟然还有打表找规律和纯贪心AC的……都是神犇啊…… 来说一下如何建图.首先把每一个点拆成$X_i$和$Y_i$,然后$S$向$X_i$连一条容量为 ...

  4. 通过get_FOO_display 查找模型中的choice值

    在django的models.py 中,我们定义了一些choices的元组,类似一些字典值,一般都是下拉框或者单多选框,例如 0对应男 1对应女等. class Area(models.Model): ...

  5. sass的基本语法与使用

    一.简介 SASS是一种CSS的开发工具,提供了许多便利的写法,大大节省了设计者的时间,使得CSS的开发,变得简单和可维护.以上都是百度的,哈哈: 其实个人认为sass就是一套提高编写css效率的规则 ...

  6. PEP 8 – Style Guide for Python Code

    原文:PEP 8 – Style Guide for Python Code PEP:8 题目:Python代码风格指南 作者:Guido van Rossum, www.yszx11.cnBarry ...

  7. JavaWeb学习笔记(九)—— JSTL标签库

    一.JSTL概述 1.1 什么是JSTL  JSTL是apache对EL表达式的扩展(也就是说JSTL依赖EL),JSTL是标签语言!JSTL标签使用以来非常方便,它与JSP动作标签一样,只不过它不是 ...

  8. python学习之路---day23--模块

    模块基本小结if __name__ == '__main__':一:import 引入模块模块:是一个包含python定义和声明的文件,文件名就是模块名字加上.py后缀,所有的py文件都可以看成是一个 ...

  9. 加、减、乘、除 高精度 string

    #include<stdio.h> #include<string> #include<string.h> #include<iostream> usi ...

  10. ZOJ - 2676 01分数规划 浮点ISAP

    题意:求最小割集\(C\),使得\(\frac{\sum_{i∈C} cost_i}{|C|}\)最小 模型就是01分数规划\(\frac{\sum_{i=1}^{m}cost_i*x}{\sum_{ ...