查看Nginx常见编译参数

[root@localhost ~] ./config --help
--help 显示本提示信息

--prefix=PATH 设定安装目录

--sbin-path=PATH 设定程序文件目录 

--conf-path=PATH 设定配置文件(nginx.conf)目录

--error-log-path=PATH 设定错误日志目录
 
--pid-path=PATH 设定pid文件(nginx.pid)目录

--lock-path=PATH 设定lock文件(nginx.lock)目录
 
--user=USER 设定程序运行的用户环境(www)
 
--group=GROUP 设定程序运行的组环境(www)

--builddir=DIR 设定程序编译目录 

--with-http_ssl_module 允许ngx_http_ssl_module模块(Apache对应:mod_ssl)

--with-http_flv_module 允许ngx_http_flv_module模块(mod_flvx)
这个模块支持对FLV(flash)文件的拖动播放。

--with-http_gzip_static_module 允许ngx_http_gzip_static_module模块(mod_dflate)。
这个模块在一个预压缩文件传送到开启Gzip压缩的客户端之前检查是否已经存在以“.gz”结尾的压缩文件,这样可以防止文件被重复压缩。

--with-http_stub_status_module 允许ngx_http_stub_status_module模块(mod_status)
这个模块可以取得一些nginx的运行状态,如果是工业状况,可以直接取消。

--without-http_gzip_module 不使用ngx_http_gzip_module模块,文件压缩模式。

--without-http_referer_module 不使用ngx_http_referer_module模块
当一个请求头的Referer字段中包含一些非正确的字段,这个模块可以禁止这个请求访问站点。可以禁止盗链的情况发生。

--with-http_perl_module 允许ngx_http_perl_module模块,这个模块允许nginx使用SSI调用perl或直接执行perl 

--with-perl_modules_path=PATH 设置perl模块路径

--with-perl=PATH 设置perl库文件路径

--http-log-path=PATH 设置access log文件路径

--http-client-body-temp-path=PATH 设置客户端请求临时文件路径

--http-proxy-temp-path=PATH 设置http proxy临时文件路径

--http-fastcgi-temp-path=PATH 设置http fastcgi临时文件路径 

--without-http 不使用HTTP server功能,如果只是做代理服务器,可以不提供http服务

--with-mail 允许POP3/IMAP4/SMTP代理模块

--with-mail_ssl_module 允许ngx_mail_ssl_module模块
这个模块使得POP3/IMAP/SMTP可以使用SSL/TLS.配置已经定义了HTTP SSL模块,但是不支持客户端证书检测

--with-sha1=DIR 设定sha1库文件路径
sha1:安全哈希算法(Secure Hash Algorithm)主要适用于数字签名标准(Digital Signature Standard DSS)里面定义的数字签名算法(Digital Signature Algorithm DSA)。对于长度小于2^64位的消息,SHA1会产生一个160位的消息摘要。当接收到消息的时候,这个消息摘要可以用来验证数据的完整性。在传输的过程中,数据很可能会发生变化,那么这时候就会产生不同的消息摘要。

--with-sha1-opt=OPTIONS 设置sha1运行参数

--with-sha1-asm 使用sha1源文件编译

--with-zlib=DIR 设定zlib库文件路径
很多程序中的压缩或者解压缩函数都会用到这个库
--with-zlib-opt=OPTIONS 设置zlib运行参数

--with-zlib-asm=CPU 使zlib对特定的CPU进行优化,可选参数:pentium, pentiumpro

--with-openssl=DIR 设定OpenSSL库文件路径

--with-openssl-opt=OPTIONS 设置OpenSSL运行参数

--with-debug 允许调试日志