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. 201621123012 《Java程序设计》第1周学习总结

    1. 本章学习总结 学习了java的理论知识和它与C语言的差别,什么是JVM,区分JRE与JDK并学习JAVA环境的安装.熟悉控制台下的常用命令,java函数的编写.熟练使用编写JAVA所需要的工具( ...

  2. session相关

    判断session是否已失效: HttpSession session=request.getSession(false); getSession(boolean)相比于getSession()更安全 ...

  3. 利用keytool工具生成数字证书

    一.制作数字证书  因测试微信小程序, 腾讯要求使用 https协议,所以需要使用证书.使用jdk工具制作数字证书流程如下: 1.查看JDK是否安装,使用命令java -version 2.切换目录至 ...

  4. 洛谷P1251 餐巾计划问题(费用流)

    传送门 不得不说这题真是思路清奇,真是网络流的一道好题,完全没想到网络流的建图还可以这么建 我们把每一个点拆成两个点,分别表示白天和晚上,白天可以得到干净的餐巾(购买的,慢洗的,快洗的),晚上可以得到 ...

  5. 【SSO单点系列】(7):CAS4.0 SERVER通过数据库方式认证用户

    在前几篇中有简单介绍服务端的认证方式,默认的是直接在 deployerConfigContext.xml 文件中 一个叫做 primaryAuthenticationHandler 的bean中配置. ...

  6. [转]Resolving Python error: Unable to find vcvarsall.bat

    Resolving Python error: Unable to find vcvarsall.bat While installing python package flask-user usin ...

  7. 修改stl::set相关源码,提供有序属性值的查找接口

    普通的stl::set,查找时只能传入key_type. 不能使用属性值查找. 例如: /* an employee record holds its ID, name and age */ clas ...

  8. Python3之XML模块

    一.简介 xml是实现不同语言或程序之间进行数据交换的协议,可扩展标记语言,标准通用标记语言的子集.是一种用于标记电子文件使其具有结构性的标记语言.xml格式如下,是通过<>节点来区别数据 ...

  9. Jquery each ajax 赋值

    <script type="text/javascript"> $(document).ready(function () { $("#mylist li s ...

  10. 一个很棒的PHP缓存类,收藏下

    <?php class Cache { /** 缓存目录 **/ var $CacheDir = './cache'; /** 缓存的文件 **/ var $CacheFile = ''; /* ...