自用的 Nginx 编译命令

./configure --user=nginx --group=nginx \
    --with-http_v2_module --with-http_ssl_module \
    --with-stream --with-stream_ssl_module --with-http_sub_module \
    --with-http_realip_module --with-stream_realip_module \
    --with-pcre=<PATH> --with-zlib=<PATH> --with-openssl=<PATH>
  1. with-http_ssl_modulearrow-up-right:支持 HTTP SSL,即 HTTPS

  2. with-streamarrow-up-right:支持四层负载

  3. with-stream_ssl_modulearrow-up-right:支持四层配置证书

  4. with-http_sub_modulearrow-up-right:网页文本、XML 内容替换

  5. with-http_realip_modulearrow-up-right:HTTP 级别记录真实 IP,例如不记录 CDN,反代 IP

  6. with-stream_realip_modulearrow-up-right:Stream 级别记录真实 IP

  7. with-pcrearrow-up-right:Rewrite 需要

Last updated