报错
报错:
nginx:[error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
核实:nginx.pid文档
[root@ecs-93f0 sbin]# cd ../
[root@ecs-93f0 nginx]# ls
client_body_temp conf fastcgi_temp html logs proxy_temp reload sbin scgi_temp uwsgi_temp
[root@ecs-93f0 nginx]# cd logs
[root@ecs-93f0 logs]# ls
access.log cq-error.log phaccess.log
screen-access.log access.log pherror.log
screen-error.log error.log testess.log nginx.pid
[root@ecs-93f0 logs]# cd ../
解决方案
解决方案:
[root@ecs-93f0 nginx]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
通过该方法,解决了该报错,服务器可正常重启(亲测有效)!!!!之前的项目也可以正常运行。
疑惑
疑惑:
这里小编logs
文件夹中这里面有.pid
文件,打开里面就一个"26213
"文本,小编有点没看懂,有没有大佬解说下,欢迎大家在评论区“留言”
突然想起,之前也出现过这种情况,回忆了一下那个干运维朋友的话,清楚记得他说不用管它,是代表什么小编忘了,尴尬三秒。
小编是学习了这篇文章解决的。