Nginx 运行状态中报错 Can‘t open PID file /var/run/nginx.pid (yet?) after start: No such...ctory问题解决办法
作者:佚名
来源:网络
点击数: 次
发布时间:2024年06月05日
问题分析:Nginx 运行状态中报错 Can‘t open PID file /var/run/nginx.pid (yet?) after start: No such...ctory问题,如下图:
Nginx自身Bug问题,导致Nginx服务优化后出现“Can’t open PID file /var/run/nginx.pid (yet?) after start: No such…ctory”报错
解决办法:
[root@node02 ~]# mkdir -p /etc/systemd/system/nginx.service.d [root@node02 ~]# vim /etc/systemd/system/nginx.service.d/override.conf [Service] ExecStartPost=/bin/sleep 0.1 [root@node02 ~]# systemctl restart nginx Warning: nginx.service changed on disk. Run 'systemctl daemon-reload' to reload units. [root@node02 ~]# systemctl daemon-reload [root@node02 ~]# systemctl restart nginx
查看nginx服务状态
参考文档:https://blog.csdn.net/xy0918zwq/article/details/114165979