大网数据广告活动
服务器运维问答

Why http2 doesn't work on my Apache/2.4.29?

· 52CE 我爱测

I have tried to enable http2 module on Apache/2.4.29 which I'm running on Ubuntu 16.04 , but it seems that it doesn't work. I did like this: sudo a2enmod http2 And then active individually by adding: Protocols h2 http/1.1 I'm als…

问题原文

原帖链接 · user134969 · CC BY-SA 3.0

I have tried to enable http2 module on Apache/2.4.29 which I'm running on Ubuntu 16.04, but it seems that it doesn't work.

I did like this:

sudo a2enmod http2

And then active individually by adding:

Protocols h2 http/1.1

I'm also running mpm_prefork module, could that cause a problem for http2 and if yes what is alternative to run instead mpm_prefork?

One more thing I'm running shared server, which only allows PHP to run. I was checking for suPHP but it says on their website:

suPHP is not maintained any longer and will not receive any further updates not even security patches.

社区高分解答

原帖链接 · conorb · CC BY-SA 3.0

Here is a quick workaround that might help you out.

Also- there is some good data about mpm_prefork and workarounds under the troubleshooting section here

Starting from Apache 2.4.27, the Apache MPM (Multi-Processing Module) prefork no longer supports HTTP/2. This will be indicated in your Apache error log as follows: AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-10-22)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。