简体   繁体   English

升级到Apache httpd 2.4.25后,http / 2.0不起作用

[英]http/2.0 doesn't work after I upgrade to apache httpd 2.4.25

Previously I use http/2.0 well on apache httpd2.4.18. 以前,我在apache httpd2.4.18上很好地使用了http / 2.0。 Today I upgrade in to httpd2.4.25 and found that all my webpages went back to http/1.1 with a Upgrade: "h2" response head on my Firefox v53.0. 今天,我升级到httpd2.4.25,发现我的所有网页都在Firefox v53.0上使用Upgrade: "h2"响应头返回到http / 1.1。 I've tried Browser won't upgrade to H2 altough "Upgrade" headers are sent but it didn't work. 我已经尝试过浏览器不会在发送“ Upgrade”标头的情况下完全升级到H2,但是它不起作用。

The resopnse head is: 响应头为:

Date: Tue, 13 Jun 2017 04:40:05 GMT
Server: Apache/2.4.25 (Red Hat) OpenSSL/1.0.1e-fips mod_fcgid/2.3.9 Phusion_Passenger/5.0.18 mod_wsgi/4.5.7 Python/2.6
Upgrade: h2
Connection: Upgrade, Keep-Alive
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 3489
Keep-Alive: timeout=5, max=100
Content-Type: text/html; charset=UTF-8

Why so? 为什么这样? I did't change any configurations of my httpd server. 我没有更改httpd服务器的任何配置。

This has nothing to do with your upgrade and this wouldn't work under your set up for 2.4.18 either. 这与您的升级无关,在您为2.4.18进行的设置中也无法使用。

The reason is not working for you is that Firefox 53 has removed HTTP/2 Support over the older NPN method and now requires ALPN as detailed in the release notes . 原因对您不起作用是因为Firefox 53已通过较旧的NPN方法删除了HTTP / 2支持,并且现在需要ALPN(如发行说明中所述)

This brings it inline to Chrome which has already dropped NPN support . 这使其可以直接插入已经放弃NPN支持的Chrome浏览器中

Unfortunately this means, you now must use openssl 1.0.2 or above as 1.0.1 which you are using does not support ALPN. 不幸的是,这意味着您现在必须使用openssl 1.0.2或更高版本,因为您使用的1.0.1不支持ALPN。 However this is a bit tricky since Red Hat does not provide anything later than 1.0.1e through the official repos. 但是,这有点棘手,因为Red Hat通过正式的回购协议不提供晚于1.0.1e的任何东西。 RedHat 7.4 is due to get it hopefully but until then your options are to use an unofficial repo, or install from source (I've a blog post on how to do the latter). RedHat 7.4有望获得它,但是在那之前,您的选择是使用一个非官方的仓库,或者从源代码安装(我有一篇关于如何执行后者的博客文章 )。 I imagine you are already doing this somewhat to get Apache 2.4.25 since it is not available on Red Hat either through the official repos. 我想您已经在某种程度上获得Apache 2.4.25了,因为它在Red Hat上都无法通过官方仓库购买。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM