[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) ...
随机推荐
- 2021级《JAVA语言程序设计》上机考试试题10
教学副院长功能页 <%@ page language="java" contentType="text/html; charset=UTF-8" page ...
- git拉取新分支、删除分支、修改远程分支
1.拉取新分支 git checkout master 切换到master分支 git pull 更新到最新代码 ...
- Postgresql如何防止数据库雪崩
一.背景 在数据库的使用过程中,一些微妙的操作,在特殊的场景中就可能导致雪崩效应. 1. 当数据库中存在未提交事务,并且未提交事务已经持有了某个表的哪怕是最小的锁时,如果此时对这个对象发起DDL操作, ...
- day07-MyBatis的关联映射01
MyBatis的关联映射 Mybatis的关联映射 实际的开发中,对数据库的操作常常会涉及到多张表,这在面向对象中就涉及到了对象与对象之间的关联关系.针对多表之间的操作,MyBatis提供了关联映射, ...
- AirTest
1.环境 直接安装AirTest IDE 就可以了 2.连接手机 打开开发者模式,允许Usb调试,手机在电脑界面显示出来即可 3.Airtest辅助窗 4.Poco辅助窗 新建一个air文件 在poc ...
- Vscode报错: error:0308010C:digital envelope routines::unsupported错误记录解决
Vscode报错: error:0308010C:digital envelope routines::unsupported错误记录解决 因为安装了新版本的node才报的错误:node版本: v18 ...
- Mogeaver 连接数据库
下载安装Mogeaver是一款开源软件,下载地址如下:https://docs.mogdb.io/zh/mogdb/v3.0/mogeaver-release-notes 根据您的操作系统选择相应的安 ...
- 前端js下载excel
// 1.文件流下载文件: export function axiosPostExport(url, data, fileName, suffix = '.xlsx') { url = get ...
- Vue基础之v-if与v-show
Show Time! 说再多不如直接上效果: (一)v-if <div id="app"> <div v-if="flag" class=&q ...
- Dockerfile自定义镜像
一.镜像结构 镜像是将应用程序及其需要的系统函数库.环境.配置.依赖等打包而成 以MySQL为例: 如上图所示,镜像由多个层(Layer)构成,每个层包含不同的内容. 另外,某些层可以单独抽出,组成一 ...