解决 nginx报错: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /usr/local/nginx/conf/vhost/xxx.com.conf:18

解决 nginx报错: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /usr/local/nginx/conf/vhost/xxx.com.conf:18

XBoy
2024-11-30 / 0 评论 / 14 阅读 / 正在检测是否收录...

在 1.25.1 版本后的 nginx 运行日志中,可能会发现以下警告信息:
[warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /usr/local/nginx/conf/vhost/xxx.com.conf:18
原配置:

listen 443 ssl http2;

修改配置为:

`listen 443 ssl;
http2 on;`

重启 nginx 即可。
参考:https://github.com/nginxinc/kubernetes-ingress/issues/4237

0

评论 (0)

(上传到图床后复制HTML图像代码到评论区即可)
取消