Why http2 doesn’t work on the Apache/2.4.29

apache-2.4http2

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.

Best Answer

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.