最近准备对nginx进行更新的时候,发现编译源码丢失了,不知道nginx编译时加载了哪些模块,所以通过nginx的-V参数找到了编译参数。
顺便一提的是nginx -V输出是标准错误输出,如需重定向文件,则需要nginx -V 2>>log
nginx的命令行参数:
Usage: nginx [-?hvVtq] [-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
-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: /usr/local/nginx/)
-c filename : set configuration file (default: conf/nginx.conf)
-g directives : set global directives out of configuration file
-v:显示版本号,如图
-V:显示版本号和编译参数,默认的安装如图
-V:显示版本号和编译参数,加载了一些模块的安装如图
End;