为什么我的网站启用了HTTP/2后却不使用http/2 [英] Why is my site not using http/2 while it is http/2 enabled

查看:133
本文介绍了为什么我的网站启用了HTTP/2后却不使用http/2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网站前面有一个NGINX反向代理. NGINX服务器为http2/ready.如果我进行测试,一切似乎都很好:

I have a NGINX reverse proxy in front of a website. The NGINX server is http2/ready. If I run a test, all seems good:

但是,当我使用浏览器访问该网站时,chrome表示该网站正在使用http/1.1.

However, when I go to the website using a browser, chrome indicates the website is using http/1.1.

我不知道为什么.有人可以帮忙吗?

I can't figure out why. Can anyone help?

推荐答案

我发现了原因.我在NGINX上启用了TLS 1.3协议. Win10上的Chrome 70与TLS 1.3握手(不带http/2).禁用TLS 1.3后,浏览器便立即握手为TLS1.2 + https/2.当然,问题是什么更快.我选择了TLS1.2 + https/2方案.

I found out why. I enabled the TLS 1.3 protocol on NGINX. Chrome 70 on Win10 handshaked to TLS 1.3 without http/2. As soon as I disabled TLS 1.3 the browser handshaked to TLS1.2 + https/2. The question, of course, is what is faster. I opted for the TLS1.2 + https/2 scenario.

这篇关于为什么我的网站启用了HTTP/2后却不使用http/2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆