Question

Enable HTTP2 in Apache on Ubuntu 16.04

Hi there,

I’ve recently created a new droplet with Ubuntu 16.04 and was pleased to see that sudo apt-get install apache2 gets me Apache 2.4.18. I was hoping that would allow me to enable HTTP2 support; alas, the respective mod_http2 is not included. Is there any way to manually install the module or to get a version of Apache that has it included?

Many thanks, Florian

Show comments

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Accepted Answer

Another option is using Ondrej’s Launchpad PPA. For example: (replacing REPOSITORY with string from that page for your Ubuntu version).

sudo add-apt-repository 'REPOSITORY'
sudo apt-get update
sudo apt-get dist-upgrade

This will give you the latest Apache rather than the version specifically for Ubuntu. Of course there are reasons Ubuntu ships slightly differently - stability, known degree of security/performance testing etc. but in my mind it is a worthwhile tradeof especially for HTTP/2

It was working fine for me but when I updated it recently it rolled back to HTTP 1.1, so I am looking out for answers who knows how to resolve this.

Please try if you know what you are doing. Neither Ubuntu nor other UNIX platforms support out of the box HTTP2 protocols. It is not recommended to run HTTP2 with these configurations on the production server unless you want to play along with it.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.