输入./nginx -h,可以得到nginx参数帮助文档
[root@cat sbin]# ./nginx -h
nginx version: nginx/1.16.0
Usage: nginx [-?hvVtTq] [-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
-T : test configuration, dump it and exit
-q : suppress non-error messages during configuration testing
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: /opt/software/nginx/)
-c filename : set configuration file (default: conf/nginx.conf)
-g directives : set global directives out of configuration file
v:显示版本。
t:测试配制文件语法是否正确。
T:显示配制版本号及配制信息
q:在测试配制文件语法过程中,忽略正确语法,不显示。只显示错误的语法。
s:发送信号。如./nginx -s reload重新加载nginx的配制文件
p:指定页面的位置
c:指定配制文件的路径
g:设置全部参数,可以脱离配制文件