[Nginx]status:203 Failed to start The NGINX HTTP and reverse proxy server
怎么感觉Linux的nGinx比Win的事一个一个一个的多啊(半恼)
运行systemctl status nginx时提示:
① Process: 123456 ExecStartPre=/usr/local/nginx/sbin/nginx -t (code=exited, status=203/EXEC)
这是【nginx.service】里配置绝对路径不匹配的问题:
cp /usr/lib/systemd/system/nginx.service /usr/lib/systemd/system/nginx.service.bak vim /usr/lib/systemd/system/nginx.service
源文件显示可能是
[Unit] Description=The NGINX HTTP and reverse proxy server After=syslog.target network.target remote-fs.target nss-lookup.target [Service] Type=forking PIDFile=/usr/local/nginx/logs/nginx.pid ExecStartPre=/usr/local/nginx/sbin/nginx -t ExecStart=/usr/local/nginx/sbin/nginx ExecReload=/usr/local/nginx/sbin/nginx -s reload ExecStop=/bin/kill -s QUIT $MAINPID ExecStartPost=/bin/sleep 0.1 PrivateTmp=true [Install] WantedBy=multi-user.target
更改为nginx的正确路径即可,比如我的是/usr/local/nginx/nginx-1.22.0/,则:

② Process: 123456 ExecStart=/usr/local/nginx/nginx-1.22.0/sbin/nginx (code=exited, status=1/FAILURE)
nginx.conf 文件配置问题,在nginx文件里运行
./nginx -c /usr/local/nginx/nginx-1.22.0/conf/nginx.conf
然后根据报错位置修改即可
③ Process: nginx[123456]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
端口被进程占用,kill掉即可
先检测是什么进程占用该端口
lsof -i :80

然后根据【PID】执行kill命令即可,比如上图的kill是
kill 159911
再次运行systemctl start nginx&&systemctl status nginx看看状态提示即可
[Nginx]status:203 Failed to start The NGINX HTTP and reverse proxy server的更多相关文章
- nginx启动报错:Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' fo
一.背景 这个错误在重启nginx或者启动nginx的时候,经常会出现.我之前也一直认为出现这个错误是因为有程序占用了nginx的进程.但是知其然不知其所以然.每次报错都有点懵逼,所以这边一步步排查错 ...
- Zabbix监控nginx status
nginx开启status ./configure --with-http_stub_status_module nginx.conflocation /statusx35 { stub_status ...
- 启用nginx status状态详解
nginx和php-fpm一样内建了一个状态页,对于想了解nginx的状态以及监控nginx非常有帮助.为了后续的zabbix监控,我们需要先了解nginx状态页是怎么回事. 1. 启用nginx s ...
- 解决nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed错误
重新启动服务器,访问web服务发现无法浏览啦!登陆服务器之后进到nginx使用./nginx -s reload重新读取配置文件,发现报nginx: [error] open() "/usr ...
- 解决nginx [error] open() "usr/local/nginx/logs/nginx.pid" failed错误
重新启动服务器,访问web服务发现无法浏览啦!登陆服务器之 后进到nginx使用./nginx -s reload重新读取配置文件,发现报nginx: [error] open() "/us ...
- Nginx status详解
1. 启用nginx status配置 server { listen *:80 default_server; server_name _; locatio ...
- nginx入门与实战 安装 启动 配置nginx Nginx状态信息(status)配置 正向代理 反向代理 nginx语法之location详解
nginx入门与实战 网站服务 想必我们大多数人都是通过访问网站而开始接触互联网的吧.我们平时访问的网站服务 就是 Web 网络服务,一般是指允许用户通过浏览器访问到互联网中各种资源的服务. Web ...
- 关于nginx报错/usr/share/nginx/html/jiankongshare" failed (2: No such file or directory)的问题解决
nginx的location虚拟目录配置: monitor.conf server { server_name monitor.chinasoft.com; server_ ...
- nginx权限问题failed(13:Permission denied)
nginx权限问题failed(13:Permission denied) 环境配置 nginx Permission denied 问题: 使用nginx代理uwsgi,出现500错误,查看ngi ...
- nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)
nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory) ...
随机推荐
- go语言面试
go面试 基础 = 和 := 的区别? **Go语言中,= 操作符用于赋值,而 := 操作符可以用于声明及赋值. Go 语言支持短变量声明(针对局部变量),以 := 为标志,这里要注意的是,Go 语言 ...
- vue页面加载闪烁的问题以及解决方案
一.原因: 问题:当我们打开Vue页面的时候,如果弱网环境,会出现一个闪烁的效果下图:加载闪烁问题效果 原因:因为在浏览器中先执行html代码,先渲染Dom,然后再执行JavaScript代码,Vue ...
- Stable Diffusion魔法入门
写在前面 本文为资料整合,没有原创内容,方便自己查找和学习, 花费了一晚上把sd安装好,又花了大半天了解sd周边的知识,终于体会到为啥这些生成式AI被称为魔法了,魔法使用前要吟唱类比到AI上不就是那些 ...
- 图解论文《The Part-Time Parliament》
本文以图文并茂的方式重新演绎 Paxos 开山之作 <The Part-Time Parliament>[1],并尝试解释原论文中语焉不详的地方. 背景 在 Paxos 小岛上,施行着一种 ...
- JZOJ 3252. 【GDOI三校联考】炸弹
思路 注:上图只是个例子,其实建图时 \(5\) 是不会连向 \(6\) 的 \(Code\) #include<cstdio> #include<cstring> #incl ...
- SpringCloud 源码学习笔记2——Feign声明式http客户端源码分析
系列文章目录和关于我 一丶Feign是什么 Feign是一种声明式. 模板化的HTTP客户端.在Spring Cloud中使用Feign,可以做到使用HTTP请求访问远程服务,就像调用本地方法一一样的 ...
- CCRD_TOC_2008年第4期
中信国健临床通讯 2008年第4期 目 录 类风湿关节炎 1. 大型系统评价分析:生物制剂与传统DMARD联用是MTX难治性RA患者的最佳治疗策略 Donahue KE, et al ...
- win11 文件夹内关闭显示更多
使用命令提示符 打开cmd窗口,输入 reg add HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\Inpro ...
- Abp+Vue iis发布报错 HTTP Error 500.30 - ANCM In-Process Start Failure
1.项目发布到文件系统 2.IIS设置 ABP 如果使用时Net Core 跨平台,它依赖AspNetCoreModuleV2模块(没有的话需要先安装) 下载地址:https://dotnet ...
- php正方形图片转成成圆形图片-GD
/** * 剪切图片为圆形 * @param $picture 图片数据流 比如file_get_contents(imageurl)返回的东东 * @return 图片数据流 */ private ...