nginx升级配置文件修改

543
0

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/****,则还有其他地方需要修改。

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注