在 nginx 遇到错误 [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead

在 1.25.1 版本后的 nginx 运行日志中,可能会发现以下警告信息:

nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in etc/nginx/nginx.conf :15

原配置:

listen 443 ssl http2;

修改配置为:

listen 443 ssl;
http2 on;

重启 nginx 即可。

参考:https://github.com/nginxinc/kubernetes-ingress/issues/4237

posted @ 2024-03-21 10:01  不是豆豆  阅读(1183)  评论(0编辑  收藏  举报
友情链接:迷途