解决 nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
Posted 默默的人生
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决 nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"相关的知识,希望对你有一定的参考价值。
使用/usr/local/nginx/sbin/nginx -s reload 重新读取配置文件出错
[root@localhost nginx]/usr/local/nginx/sbin/nginx -s reload
提示 nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
[root@localhost nginx]# cd logs
[root@localhost logs]# ls
access.log error.log nginx-access.log nginx_error.log
果然没有/usr/local/nginx/logs/nginx.pid 文件
解决方法:用指定文件加载nginx配置文件
[root@localhost nginx]/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
以上是关于解决 nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"的主要内容,如果未能解决你的问题,请参考以下文章
nginx: [error] invalid PID number "" in "/run/ngin
nginx: [error] invalid PID number ““ in “/data/nginx/logs/nginx.pid“
nginx: [error] invalid PID number “” in “/usr/local/var/run/nginx/nginx.pid”
nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"