nginx: [error] invalid PID number “” in “/usr/local/var/run/nginx/nginx.pid”

Posted ⬆️小马哥⬆️

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nginx: [error] invalid PID number “” in “/usr/local/var/run/nginx/nginx.pid”相关的知识,希望对你有一定的参考价值。

在Mac上用brew安装nginx,然后修改Nginx配置文件,再重启时报出如下错误:

nginx: [error] invalid PID number "" in "/usr/local/var/run/nginx/nginx.pid"

解决办法:


指定一个特定的nginx加载配置文件。
$ sudo nginx -c /usr/local/etc/nginx/nginx.conf
$ sudo nginx -s reload

以上是关于nginx: [error] invalid PID number “” in “/usr/local/var/run/nginx/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"