Nginx启动、停止、平滑重启


Nginx启动、停止、平滑重启
 
1 启动
  
  # nginx -c /etc/nginx.conf
  如果不加 -c 参数,Nginx默认加载conf子目录中的nginx.conf
  
2 停止
  
  找出Master PID
  # ps -ef | grep nginx 
  
  从容停止
  # kill -QUIT MasterPID
  
  快速停止
  # kill -TERM MasterPID 
  或
  # kill -INT MasterPID 
  
  强制停止
  # pkill -9 nginx
  
3 平滑重启
  
  重启前先确认Nginx配置文件的语法是否正确
  # nginx -t -c /etc/nginx.conf
  # kill -HUP MasterPID
 

相关内容

    暂无相关文章