自用的 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>
with-http_v2_module:支持 HTTP2
with-http_ssl_module:支持 HTTP SSL,即 HTTPS
with-stream:支持四层负载
with-stream_ssl_module:支持四层配置证书
with-http_sub_module:网页文本、XML 内容替换
with-http_realip_module:HTTP 级别记录真实 IP,例如不记录 CDN,反代 IP
with-stream_realip_module:Stream 级别记录真实 IP
with-pcre:Rewrite 需要
with-zlib:Gzip 需要
with-openssl:SSL 需要
Last updated
Was this helpful?