Trying to enable http2 on Ubuntu 17.04, Apache/2.4.25

Posted August 14, 2017 3.2k views

I tried: sudo a2enmod http2

but it says it doesn’t exist? Do I need another version of apache?

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
2 answers

HTTP/2 in Apache is production-ready starting with version 2.4.26. So you will need Apache 2.4.26 or above. This can be realized by executing the following commands in the shell:

$ sudo apt install software-properties-common
$ sudo add-apt-repository ppa:ondrej/apache2
$ sudo apt update
$ sudo apt install apache2

Then you can redo your original command to activate the module in Apache:

$ sudo a2enmod http2

Hope it helps.