nginx 1.24.0升级到1.26.0,用nginx -t
测试一下,出现了nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /home/****
这个不影响nginx启动。
解决办法:
原来的写法:
listen 0.0.0.0:443 ssl http2;
改为:
listen 0.0.0.0:443 ssl;
http2 on;
修改完成后,再次测试,如果出现:nginx: [warn] protocol options redefined for ip:443 in /home/****,则还有其他地方需要修改。