This is a quick guide for enabling HTTP2 on Ubuntu 16.04. I use digital ocean and there I have a few instances that (at the time of writing this) run on Ubuntu 16.04 and have apache 2.4.18 installed.
First you need to add this PPA repository and installing (upgrading) apache2:
sudo apt-get update
sudo apt-get dist-upgrade
This is needed for installing latest apache (that will have HTTP2 module included in the compiled binary). Remember that this is a trade off – Ubuntu doesn’t ship this by default and there is a reason for this – when it’s battle tested and passed all the required testing it will be included. But this is a good trade off if you need HTTP2 today.
What is left is to active the HTTP2 module:
Update your apache config by specifying protocols to be used:
Restart Apache and test that HTTP2 protocol is working at: http2-test.
More informations about the module itself can be found here: Apache mod_http2 docs.