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

时间:2024-04-03 12:56:10

nginx服务一直被拒绝连接

查看Nginx状态,发现报错

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

Failed to parse 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

上面依次执行,然后查看状态,搞定

service nginx status

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

 

 

搞定错误,但是nginx服务仍旧没拒绝连接