当前位置 主页 > 服务器问题 > nginx问题汇总 >

    重启nginx后丢失nginx.pid的解决方法(2)

    栏目:nginx问题汇总 时间:2018-09-30 16:19


    [error]: invalid PID number "" in "/var/run/nginx.pid"
    That /var/run/nginx/pid file is empty atm.
    What do I need to do to fix it?

    nginx -s reload is only used to tell a running nginx process to reload its config. After a stop, you don't have a running nginx process to send a signal to. Just run nginx (possibly with a -c /path/to/config/file)

    使用方法:

    复制代码 代码如下:
    nginx -c /path/to/config/file
    //我的机器是这样:/alidata/server/nginx/sbin/nginx -c /alidata/server/nginx/conf/nginx.conf