Menu Home

Nginx failed to read PID 报错

Linux 下安装 nginx 后,观察服务运行状态发现以下错误:

nginx Failed to read PID from file /run/nginx.pid:lnvalid agrument

解决方法

root@track2web.com:~# mkdir -p /etc/systemd/system/nginx.service.d
root@track2web.com:~# printf "[Service]\nExecStartPost=/bin/sleep 0.1\n" > /etc/systemd/system/nginx.service.d/override.conf

重启服务

root@track2web.com:~# systemctl daemon-reload 
root@track2web.com:~# systemctl restart nginx.service

Categories: nginx

Tagged as:

RoyAkon