HTTP/2 is the second major version of the HTTP protocol used by web servers. It is based on Google’s SPDY protocol. It is the first new version of HTTP since HTTP 1.1, which was standardised way back in 1997. By the end of 2015, most major bowsers (Chrome, Opera, Firefox, Internet Explorer 11, Safari, Amazon Silk and Edge) added HTTP/2 support by the end of 2015.

At this moment in time, HTTP/2 is not enabled by default in Apache. HTTP/2 is supported from version 2.4.12, but the module was renamed to mod_http2 in version 2.4.17 and above.

So, to enable it, you need to add one line (With Ubuntu 16.04) within your SSL vHost configuration:

 Protocols h2 http/1.1

Thats it! Gracefully restart Apache with

$ apachectl graceful

You will now find that your SSL vHost will now perform a lot quicker on browsers which have HTTP/2 support. If a visitor does not have a browser with support, it will fall back to HTTP/1.1

Show CommentsClose Comments

Leave a comment