nginx: [error] invalid PID number "" in "/run/ngin

nginx重启报错:nginx: [error] invalid PID number “” in “/run/nginx.pid”

问题描述:执行 nginx -t 是OK的,然而在执行 nginx -s reload 的时候报错

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

解决办法

    需要先执行

    nginx -c /etc/nginx/nginx.conf

    nginx.conf文件的路径可以从nginx -t的返回中找到。

    nginx -s reload

    原文作者:终而有始
    原文地址: https://blog.51cto.com/13293070/2440960
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞