在nginx的安装目录有一个nginx文件执行nginx -s reload,平滑重启,中间服务器不会挂掉
[root@bogon sbin]# nginx -s reload [root@bogon sbin]# ps -ef|grep nginx root 2867 1 0 08:25 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf www 7658 2867 0 09:55 ? 00:00:00 nginx: worker process www 7659 2867 0 09:55 ? 00:00:00 nginx: worker process www 7661 2867 0 09:55 ? 00:00:00 nginx: worker process www 7662 2867 0 09:55 ? 00:00:00 nginx: worker process root 7664 4569 0 09:55 pts/0 00:00:00 grep --color=auto nginx [root@bogon sbin]# pwd /usr/local/nginx/sbin
这里我的nginx是在/user/local/nginx/sbin.