【问题标题】:http/2.0 doesn't work after I upgrade to apache httpd 2.4.25升级到 apache httpd 2.4.25 后,http/2.0 不起作用
【发布时间】:2017-11-14 16:57:33
【问题描述】:

以前我在 apache httpd2.4.18 上很好地使用了 http/2.0。今天我升级到 httpd2.4.25,发现我的所有网页都回到了 http/1.1,并在我的 Firefox v53.0 上带有 Upgrade: "h2" 响应头。我试过Browser won't upgrade to H2 altough "Upgrade" headers are sent,但没用。

响应头是:

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

为什么会这样?我没有更改我的 httpd 服务器的任何配置。

【问题讨论】:

    标签: apache ssl https http2


    【解决方案1】:

    这与您的升级无关,并且在您的 2.4.18 设置下也不起作用。

    不适合您的原因是 Firefox 53 has removed HTTP/2 Support over the older NPN method 现在需要 ALPN,如 release notes 中所述。

    这会将其内联到 Chrome which has already dropped NPN support

    不幸的是,这意味着您现在必须使用 openssl 1.0.2 或更高版本,因为您使用的 1.0.1 不支持 ALPN。然而这有点棘手,因为 Red Hat 没有通过官方 repos 提供任何晚于 1.0.1e 的东西。 RedHat 7.4 is due to get it hopefully 但在那之前你的选择是使用非官方的 repo,或者从源代码安装(我有一个 blog post 关于如何做后者)。我想您已经在某种程度上获得了 Apache 2.4.25,因为它在 Red Hat 上也无法通过官方 repos 获得。

    【讨论】:

    • 嗯,我使用的是 CentOS 6.9。我的 Apache 2.4.25 来自 Software Collection
    猜你喜欢
    • 1970-01-01
    • 2017-08-03
    • 1970-01-01
    • 2017-02-24
    • 2013-11-30
    • 2013-05-19
    • 2015-12-08
    • 2017-07-06
    • 1970-01-01
    相关资源
    最近更新 更多