nginx重启报错

[nginx@p0-hfssp-healthos-web02 sbin]$ sudo ./nginx -s reload
nginx: [error] invalid PID number "" in "/home/nginx/openresty/nginx/logs/nginx.pid"


发生这个错误的原因是,nginx读取配置文件时出错,需要指定一个特定的nginx配置文件,所以解决这个问题需要先执行
[nginx@p0-hfssp-healthos-web02 sbin]$ sudo ./nginx -c conf/nginx.conf
[nginx@p0-hfssp-healthos-web02 sbin]$ sudo ./nginx -s reload

posted @ 2021-06-24 11:26  表演给自己看的认真  阅读(96)  评论(0编辑  收藏  举报