nginx升级配置文件修改

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

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *