1,启动 nginx报错

systemctl start nginx
[root@laoban yum.repos.d]# systemctl start nginx
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "jetails.
[root@laoban yum.repos.d]# 

2,查看nginx状态

systemctl status nginx.service

在这里插入图片描述

报错提示: Failed to start The nginx HTTP and reverse proxy server.

3,看一下nginx端口号

netstat -anpt | grep nginx

在这里插入图片描述
nginx端口号是71816

4,杀死nginx进程

kill -QUIT 主进程号
kill -QUIT 71816

经过测试,kill -QUIT 该命令会自动 kill 掉 nginx 的父和子进程,推荐使用!如果 只用 kill -9 主进程,只有主进程被 kill,nginx 子进程还在!!!

5,重启

systemctl restart nginx
systemctl status nginx

在这里插入图片描述


创作不易,小小的支持一下吧!

在这里插入图片描述

Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐