centos7 nginx Failed to read PID from file /run/nginx.pid: Invalid argument 解决方法
笔者在centos7上,配置nginx代理服务后,
systemctl status nginx.service
提示错误
Failed to read PID from file /run/nginx.pid: Invalid argument
看到好多说删掉改nginx.pid 文件的,试之,无效。
后来找到了一个方法:
mkdir -p /etc/systemd/system/nginx.service.d
printf "[Service]\nExecStartPost=/bin/sleep 0.1\n" > /etc/systemd/system/nginx.service.d/override.conf
然后
systemctl daemon-reload
systemctl restart nginx.service
---------------------
作者:katios
来源:CSDN
原文:https://blog.csdn.net/sinat_21302587/article/details/72722096
版权声明:本文为博主原创文章,转载请附上博文链接!