centos下编译安装nginx|configure参数对照列表

4.Nginx的configure脚本支持的选项。(可以通过  ./configure  --help命令查看Nginx可选择的编译选项,以下仅列出本人比较常用的选项

  1. --prefix=<path>   ——Nginx安装路径,如果没有指定,默认为  /usr/local/nginx  
  2. --sbin-path=<path>  ——Nginx可执行文件安装路径。只能安装时指定,如果没有指定,默认为<prefix>/sbin/nginx  
  3. --conf-path=<path>  ——在没有给定-c选项下默认的nginx.conf的路径。如果没有指定,默认为<prefix>/conf/nginx.conf  
  4. --pid-path=<path>  ——在nginx.conf中没有指定pid指令的情况下,默认的nginx.pid的路径。如果没有指定,默认为<prefix>/logs/nginx.conf  
  5. --error-log-path=<path>  ——在nginx.conf中没有指定error_log指令的情况下,默认的错误日志的路径。如果没有指定,默认为<prefix>/logs/error.log  
  6. --http-log-path=<path>  ——在nginx.conf中没有指定access_log指令的情况下,默认的访问日志的路径。如果没有指定,默认为<path>/logs/access.log  
  7. --user=<path>  ——在nginx.conf中没有指定user指令的情况下,默认的Nginx使用的用户。如果没有指定,默认为nobody  
  8. --group=<path>  ——在nginx.conf中没有指定user指令的情况下,默认的Nginx使用的组,如果没有指定,默认为nobody  
  9. --with-http_ssl_module  ——开启HTTP SSL模块,使Nginx可以支持HTTPS请求。这个模块需要已经安装 openssl ,在debian上是libssl  
  10. --with-http_dav_module  ——启用ngx_http_dav_module  
  11. --with-http_flv_module  ——启用ngx_http_flv_module  
  12. --with-http_gzip_module  ——启用ngx_http_gzip_module,需要zlib库的支持  
  13. --with-http_stub_status_module  ——启用“server status”统计页  
  14. --with-http_referer_module  ——启用ngx_http_referer_module,当浏览器向web服务器发送请求的时候,一般会带上referer,告诉服务器我是从哪个页面链接过来的,服务器籍此可以获得一些信息用于处理  
  15. --with-http_rewrite_module  ——启用ngx_http_rewrite_module,需要pcre库的支持  
  16. --with-http_proxy_module  ——启用ngx_http_proxy_module  
  17. --with-http_fastcgi_module  ——启用ngx_http_fastcgi_module  
  18. --http-client-body-temp-path=PATH  ——指定http客户端请求缓存文件存放目录的路径  
  19. --http-proxy-temp-path=PATH  ——指定http反向代理缓存文件存放目录的路径  
  20. --http-fastcgi-temp-path=PATH  ——指定http FastCGI缓存文件存放目录的路径  
  21. --with-mail  ——启用IMAP4/POP3/SMTP 代理模块  
  22. --with-mail_ssl_module  ——启用ngx_mail_ssl_module  
  23. --with-cpu-opt=CPU  ——为特定的CPU编译,有效的值包括:pentium 、pentiumpro 、pentium3 、pentium4 、athlon 、opteron 、amd64 、sparc64 、ppc64  
  24. --with-pcre=DIR  ——指定PCRE库的源代码的路径  
  25. --with-pcre-opt=OPTIONS  ——设置PCRE的额外编译选项  
  26. --with-md5=DIR  ——设置MD5库的源代码路径  
  27. --with-md5-opt=OPTIONS  ——设置MD5库的额外编译选项  
  28. --with-md5-asm  ——使用MD5汇编源码  
  29. --with-sha1=DIR  ——设置sha1库的源代码的路径  
  30. --with-sha1-opt=OPTIONS  ——设置sha1库的额外编译选项  
  31. --with-sha1-asm  ——使用sha1汇编源码  
  32. --with-zlib=DIR  ——设置zlib库的源代码路径  
  33. --with-zlib-opt=OPTIONS  ——设置zlib库的额外编译选项  
  34. --with-openssl=DIR  ——设置openssl库的源代码路径  
  35. --with-openssl-opt=OPTIONS  ——设置openssl库的额外编译选项  
  36. --with-debug  ——启用调试日志  
  37. --add-module=PATH  ——添加一个在指定路径中能够找到的第三方模块
  38.  PS:其实可以直接可以用yum 安装的,但是为了练习 所以,采用编译方式安装..
原文地址:https://www.cnblogs.com/y0umer/p/3050158.html