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 add-apt-repository ppa:ondrej/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:

sudo a2enmod http2

Update your apache config by specifying protocols to be used:

Protocols h2 h2c http/1.1

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.

Leave a Reply

Your email address will not be published. Required fields are marked *