nginx 1.31.4 Mainline 已新增到 CodeIT 仓库,支持 HTTP/3。http2 和 ngx_cache_purge 已内置,并且 OpenSSL 动态链接官方 OpenSSL 4.0.1,支持 QUIC。Google 的 Brotli 压缩模块和 ngx_http_geoip2 以动态模块形式提供,位于 nginx-module-brotli 和 nginx-module-geoip2 软件包中,nginx rpm 会自动安装它们(保留该依赖是为了让现有安装在升级时不丢失相关指令;几个月后我们会移除它,这两个模块将变为完全可选)。这些软件包适用于 RHEL、CentOS、AlmaLinux、Rocky Linux 和 Oracle Linux 7、8、9 和 10,以及 Ubuntu 22.04 和 24.04。
其余动态模块单独打包,可按需安装:nginx-module-lua(配合 lua-resty-core 和 lua-resty-lrucache)、nginx-module-acme(自动申请 ACMEv2 证书)、nginx-module-njs、nginx-module-perl、nginx-module-xslt 和 nginx-module-image-filter。每个软件包都会在 /etc/nginx/modules-enabled 中写入自己的 load_module 指令,安装后即可生效,无需手动修改 nginx.conf。Lua 和 ACME 为 EL9、EL10 和 Ubuntu 构建;EL7 改为提供 nginx-module-geoip,而 njs、Perl、XSLT 和 image-filter 仅有 rpm 版本。
同一版本也发布到 Docker Hub 的 codeitus/nginx:镜像基于 AlmaLinux 9,由这些软件包构建,并同时提供 amd64 和 arm64:
- 最新镜像,来自最后发布的那个分支:docker pull codeitus/nginx
- 最新的 Mainline 镜像:docker pull codeitus/nginx:mainline
- 本次发布的确切版本:docker pull codeitus/nginx:1.31.4
HTTP/3 还需要发布 UDP 端口,而不只是 TCP 端口:docker run -d -p 80:80 -p 443:443 -p 443:443/udp codeitus/nginx
主要变更:
- Feature: stream 和 mail 模块中的 “proxy_protocol” 指令现在支持 PROXY 协议版本 2。
- Change: 现在对后端的 HTTP/2 和 gRPC 请求总是使用伪首部 “:authority” 发送,而对后端的 HTTP/1.1 请求则使用 “Host” 首部发送。
- Bugfix: 如果使用了 “select” 方法,工作进程中可能会发生段错误。
- Bugfix: 具有非零 “Content-Length” 首部行的、不完整的 gRPC 响应现在会被视为格式错误。
- Bugfix: 修复了与使用脚本代码的第三方模块的二进制兼容性问题;该问题出现在 1.31.3 中。
- Bugfix: 在 ngx_http_perl_module 中。
- Bugfixes 于 HTTP/2、HTTP/3、ngx_http_image_filter_module 和 ngx_http_grpc_module。
