十五年测试老手,长期负责WEB\APP 项目测试,目前主要负责团队管理工作。

Nginx 新的重载方式 (nginx -s reload)

上一篇 / 下一篇  2011-06-18 22:05:20 / 个人分类:nginx

[oschina@liubc oschina]$ /opt/ngx/sbin/nginx -h
nginx version: nginx/0.8.45
Usage: nginx [-?hvVt] [-s signal] [-c filename] [-p prefix] [-g directives]

Options:
  -?,-h         : this help
  -v            : show version and exit
  -V            : show version and configure options then exit
  -t            : test configuration and exit
  -s signal     : send signal to a master process: stop, quit, reopen, reload
  -p prefix     : set prefix path (default: /opt/nginx-0.8.45/)
  -c filename   : set configuration file (default: conf/nginx.conf)
  -g directives : set global directives out of configuration file

(I)Y4LzW0

其中 -s 参数是以前版本没有的,可用来给 Nginx 主进程发送信号

W\U[r;lP+^|0

原来我们可以用 killall -s HUP nginx 或者 kill -HUP `cat /opt/ngx/logs/nginx.pid` 方法来重新加载配置,现在只需要用 nginx -s reload 命令即可。还是挺省事的。51Testing软件测试网(RqDC[

-h 参数包含四个命令分别是 stop/quit/reopen/reload51Testing软件测试网_0O7f4F&Kt&hSx


TAG: nginx Nginx

 

评分:0

我来说两句

Open Toolbar