VPS侦探论坛

 找回密码
 注册
查看: 9771|回复: 1

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

[复制链接]
发表于 2010-12-13 11:58:58 | 显示全部楼层 |阅读模式

  1. vpser:~# /usr/local/nginx/sbin/nginx -h   
  2. nginx version: nginx/0.7.67
  3. Usage: nginx [-?hvVt] [-s signal] [-c filename] [-p prefix] [-g directives]

  4. Options:
  5.   -?,-h         : this help
  6.   -v            : show version and exit
  7.   -V            : show version and configure options then exit
  8.   -t            : test configuration and exit
  9.   -s signal     : send signal to a master process: stop, quit, reopen, reload
  10.   -p prefix     : set prefix path (default: /usr/local/nginx/)
  11.   -c filename   : set configuration file (default: conf/nginx.conf)
  12.   -g directives : set global directives out of configuration file
复制代码



Nginx 从 0.7.53 版本之后新增了一些命令行参数:-s


以前都是用kill -HUP `cat /usr/local/nginx/logs/nginx.pid` 方法来重新加载配置,现在只需要用 /usr/local/nginx/sbin/nginx -s reload 命令即可。

-s参数包含四个命令分别是 stop/quit/reopen/reload
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2010-12-13 12:26:52 | 显示全部楼层


新的?

貌似 我一直就是使用 reload 作为重启的方式
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-8 07:18 , Processed in 0.025473 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表