nginx 错误Failed to start The nginx HTTP and reverse proxy server.

nginx 启动中可能会报以下错误,演示如下:

[centos@localhost nginx-1.16.1]$ :<<!启动 nginx
!
[centos@localhost nginx-1.16.1]$ sudo systemctl start nginx
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
[centos@localhost nginx-1.16.1]$ :<<!检查 nginx 状态
!
[centos@localhost nginx-1.16.1]$ sudo systemctl status nginx.service
[sudo] centos 的密码:
● nginx.service - The nginx HTTP and reverse proxy serverLoaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)Active: failed (Result: exit-code) since 二 2020-04-21 11:27:49 CST; 13min agoProcess: 68706 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)Process: 68702 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)4月 21 11:27:49 localhost.localdomain systemd[1]: Starting The nginx HTTP and reverse proxy server...
4月 21 11:27:49 localhost.localdomain nginx[68706]: nginx: [emerg] module "/usr/lib64/nginx/modules/...f:1
4月 21 11:27:49 localhost.localdomain nginx[68706]: nginx: configuration file /etc/nginx/nginx.conf ...led
4月 21 11:27:49 localhost.localdomain systemd[1]: nginx.service: control process exited, code=exited...s=1
4月 21 11:27:49 localhost.localdomain systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
4月 21 11:27:49 localhost.localdomain systemd[1]: Unit nginx.service entered failed state.
4月 21 11:27:49 localhost.localdomain systemd[1]: nginx.se
[centos@localhost nginx-1.16.1]$ :<<!查看 nginx 输出的错误
!
[centos@localhost nginx-1.16.1]$ sudo /usr/sbin/nginx

要查看输出的错误是什么?键入命令 /usr/sbin/nginx 运行即会显示明显的错误。一般是端口80被占用的错误,也有可能模块上(编译时)的错误。错误类型较多,需要逐个根据自己的错误情况进行解决。

此处给个报错例子,可能产生以下错误:

[centos@localhost ~]$ sudo /usr/sbin/nginx
[sudo] centos 的密码:
nginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_image_filter_module.so" is not binary compatible in /usr/share/nginx/modules/mod-http-image-filter.conf:1

此处的解决办法请参考我的另一篇博客:Nginx 添加第三方模块,出现 is not binary compatible in 错误的问题解决

nginx 错误Failed to start The nginx HTTP and reverse proxy server.相关推荐

  1. nginx启动报错:Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' fo

    一.背景 这个错误在重启nginx或者启动nginx的时候,经常会出现.我之前也一直认为出现这个错误是因为有程序占用了nginx的进程.但是知其然不知其所以然.每次报错都有点懵逼,所以这边一步步排查错 ...

  2. php7.0搭配nginx,Linux安装配置php7.0+nginx

    2.安装nginx 查看nginx相关信息 yum list | grep nginx collectd-nginx.x86_64 4.10.9-1.el6 epel munin-nginx.noar ...

  3. Nginx启动报错误unlink() “nginx.pid” failed (2: No such file or directory)

    在修改了配置文件之后,启动nginx的时候发现,进程已经存在了,但是端口没有监听到. 查看错误日志,有如下错误信息 2015/10/22 21:39:06 [alert] 26434#0: unlin ...

  4. (转)解决nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed错误

    重新启动服务器,访问web服务发现无法浏览啦!登陆服务器之后进到nginx使用./nginx -s reload重新读取配置文件,发现报nginx: [error] open() "/usr ...

  5. nginx php 104,Nginx错误:recv() failed (104: Connection reset by peer) whi

    Nginx错误:recv() failed (104: Connection reset by peer) while reading response header from upstream PH ...

  6. 解决nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed错误

    [root@localhost sbin]# ./nginx -s reload nginx: [error] open() "/usr/local/nginx/logs/nginx.pid ...

  7. linux中安装httpd安装错误,linux安装httpd和nginx常见问题及解决办法

    1 httpd-2.4.23.tar.gz安装 安装httpd之前,需要安装:gcc.apr.apr-util.pcre.zlib. 文件参考:D:\01soft\02测试\02悬镜管家\web服务\ ...

  8. 启动nginx服务报错Job for nginx.service failed because the control process exited with error code.

    nginx使用service nginx restart报错 启动nginx服务时如果遇到这个错误 Job for nginx.service failed because the control p ...

  9. nginx: [emerg] mkdir() /var/temp/nginx/client failed (2: No such file or directory)

    出现这种问题的解决方法    nginx: [emerg] mkdir() "/var/temp/nginx/client" failed (2: No such file or ...

  10. nginx: [error] CreateFile() “D:\nginx-1.21.6/logs/nginx.pid“ failed (2: The system cannot find the

    问题描述 nginx: [error] CreateFile() "D:\nginx\nginx-1.21.6\nginx-1.21.6/logs/nginx.pid" faile ...

最新文章

  1. TF-IDF 原理及sklearn中的tf-idf实例分析
  2. Docker监控方案(TIG)的研究与实践之Grafana
  3. pdf转换成html python,在Python中将pdf转换为html
  4. html相对路径载入页面,html页面的绝对路径和相对路径
  5. MySQL常用权限的解释
  6. 少儿编程150讲轻松学Scratch(十二)-Scratch编程算法练习-选择排序
  7. 人工智能自拍之后,会怎样给自己P图?
  8. jquery 下拉选择框/复选框常用操作
  9. windows nginx 停止和启动_nginx在window与linux中启动、停止、与关闭
  10. 远程修改服务器登录密码,远程服务器修改登录密码
  11. 【两种方式】用python和ENVI画出高光谱遥感影像的3D立体图
  12. 江南大学 超级计算机,基于分布式并行计算的高性能演化算法研究
  13. 计算机能玩什么游戏,《梦幻西游网页版》官网——网易官方正版出品
  14. 声纹识别损失函数总结
  15. Python爬虫实战爬取租房网站2w+数据-链家上海区域信息(超详细)
  16. 贫富差距,不是收入分化,而是资产分化
  17. 大话循环神经网络(RNN)
  18. 关于OpenHarmony蜂窝通信框架能力的说明
  19. Shell通过递归求阶乘
  20. 什么是“国家中小企业公共服务示范平台”?

热门文章

  1. Excel 导入 SqlServer 导入部分文本为空解决方案
  2. Java常用类(详细)总结
  3. readelf 解读
  4. ATP-EMTP中的LCC模块电缆线路阅读bergeron模型与JMarti模型数据卡
  5. 乐购系统源码可多开站
  6. 2021下半年 自编译最新稳定版 裴讯 Phicomm K2 Openwrt 固件
  7. 企业应该了解的ISO27001体系建设指导
  8. api wke_给Webkit内核的浏览器控件增加互交功能
  9. 捷联惯导系统(SINS)误差模型
  10. x86下vx6.8软件wind River workbench使用说明