nginx: [error] invalid PID number

一、检查nginx配置文件语法有无错误

[root@web01 conf]# /application/nginx/sbin/nginx -t
nginx: the configuration file /application/nginx-16.0/conf/nginx.conf syntax is ok

nginx: configuration file /application/nginx-16.0/conf/nginx.conf test is successful

二、平滑重启并失败

[root@web01 conf]# /application/nginx/sbin/nginx -s reload
nginx: [error] invalid PID number "" in "/application/nginx-16.0/logs/nginx.pid"

三、使用此命令:/application/nginx/sbin/nginx -c /application/nginx-16.0/conf/nginx.conf

[root@web01 conf]# /application/nginx/sbin/nginx -c /application/nginx-16.0/conf/nginx.conf

四、平滑重启成功

[root@web01 conf]# /application/nginx/sbin/nginx -s reload

猜你喜欢

转载自blog.51cto.com/14078730/2420859