nginx -s reload 直接重啓,沒有提示就是成功了。
# nginx -s reload
nginx: [error] invalid PID number "" in "/run/nginx.pid"
如果提示 invalid PID number
# nginx -t
# nginx -c /etc/nginx/nginx.conf
# nginx -s reload
# ps -ef | grep nginx
root 22765 1 0 11:20 ? 00:00:00 nginx: master process /usr/sbin/nginx
nginx 22766 22765 0 11:20 ? 00:00:02 nginx: worker process
nginx 22767 22765 0 11:20 ? 00:00:02 nginx: worker process
root 23719 19310 0 11:27 pts/1 00:00:00 grep --color=auto nginx
# kill 22765
# kill 22766
# kill 22767
# service nginx start