Has anybody successfully enabled HTTP/2 on Ubuntu 16.04 with Apache 2.4.18?

Posted May 17, 2016 7.5k views
ApacheLAMP StackUbuntu 16.04

If so, please explain to me how you were able to do it.

When I run either of the following:

sudo a2enmod mod_http2
sudo a2enmod http2

I receive the following respectively:

ERROR: Module mod_http2 does not exist!
ERROR: Module http2 does not exist!

Jay Welsh.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

You would need to install an Apache package that contains the http2 module, which is not the case of Ubuntu 16.04’s package.

You need to follow these steps to install http2 module in Ubuntu 16.04

# add-apt-repository -y ppa:ondrej/apache2

# apt update

# apt –only-upgrade install apache2 -y

# a2enmod http2

# service apache2 restart