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

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

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

 

原配置:

listen 443 ssl http2;

修改配置为:

listen 443 ssl;
http2 on;

重启 nginx 即可。

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

posted @ 2024-05-12 07:37  锐洋智能  阅读(480)  评论(0编辑  收藏  举报