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



By 迦夜

2013-10-23

Good Luck

  
请使用浏览器的分享功能分享到微信等