Skip to content

Instantly share code, notes, and snippets.

@JagoWang
Last active December 12, 2015 00:38
Show Gist options
  • Save JagoWang/4684753 to your computer and use it in GitHub Desktop.
Save JagoWang/4684753 to your computer and use it in GitHub Desktop.
nginx -t 测试配置文件语法
nginx -s reload 重新加载配置文件
nginx -c /usr/nginx/conf/nginx.conf 启动(若不指定配置文件,默认启动conf/nginx.conf)
nginx -s stop 关闭
nginx -h 命令选项列表
ps aux |grep nginx //查找master process pid
ps ef | grep nginx
平滑重启:
kill -HUP $master_pid (/nginx -s reload)
从容停止Nginx:
kill -QUIT $master_pid
快速停止Nginx:
kill -TERM $master_pid
强制停止Nginx:
pkill -9 nginx
@JagoWang
Copy link
Author

JagoWang commented Mar 9, 2013

Already backup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment