码迷,mamicode.com
首页 > 其他好文 > 详细

nginx 支持的命令行参数

时间:2018-07-04 23:39:26      阅读:194      评论:0      收藏:0      [点我收藏+]

标签:标准输出   cpu   sam   erro   local   syn   instead   global   quit   

Command-line parameters
命令行参数


nginx supports the following command-line parameters:
nginx支持以下命令行参数


-? | -h — print help for command-line parameters.
-? | -h —打印命令行参数的帮助


-c file — use an alternative configuration file instead of a default file.
-c file —使用可选的配置文件替代默认的配置文件


-g directives — set global configuration directives, for example,
-g 指令 —设置全局配置指令,例如
nginx -g "pid /var/run/nginx.pid; worker_processes sysctl -n hw.ncpu;"


-p prefix — set nginx path prefix, i.e. a directory that will keep server files (default value is /usr/local/nginx).
-p prefix —设置nginx的预设路径。例如:一个将要保存服务器文件的目录(默认值是/usr/local/nginx)


-q — suppress non-error messages during configuration testing.
-q —在配置文件测试期间抑制非错误消息


-s signal — send a signal to the master process. The argument signal can be one of:
-s 信号 — 发送一个信号给主进程。参数信号可以是下列之一:
stop — shut down quickly
stop — 迅速关闭
quit — shut down gracefully
quit — 优雅的关闭
reload — reload configuration, start the new worker process with a new configuration, gracefully shut down old worker processes.
reload — 重载配置文件,用新的配置文件开启新的工作进程。优雅的关闭旧的进程。(也就是等旧的进程完成工作以后再结束它,不接受新的工作。)
reopen — reopen log files
reopen — 重新打开日志文件


-t — test the configuration file: nginx checks the configuration for correct syntax, and then tries to open files referred in the configuration.
-t —测试配置文件:nginx检查配置文件的语法,然后尝试打开配置文件中涉及的文件。


-T — same as -t, but additionally dump configuration files to standard output (1.9.2).
-T — 与-t参数一样,但另外还要将配置文件转储到标准输出。


-V — print nginx version, compiler version, and configure parameters.
-V — 打印nginx的版本,编译版本和配置参数


原文链接: http://nginx.org/en/docs/switches.html

nginx 支持的命令行参数

标签:标准输出   cpu   sam   erro   local   syn   instead   global   quit   

原文地址:https://www.cnblogs.com/minn/p/9265837.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!