Failed to read PID from file /run/nginx.pid: Invalid argument

nginx
创建于:2019年10月11日 更新于:2020年01月13日

systemctl status nginx.service
查看nginx状态时提示
Failed to read PID from file /run/nginx.pid: Invalid argument

解决办法

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