HTTP/2 is the first major HTTP protocol update since 1997 when HTTP/1.1 was first published by the IETF. HTTP/2 (originally named HTTP/2.0) is the second major version of the HTTP network protocol which was released by Internet Engineering Task Force (IETF) HTTP Working Group.
It’s based on SPDY, SPDY (pronounced speedy) is an open networking protocol developed by Google to serve web content with reducing web page load, latency and improving web security. This can be achieved through compression, multiplexing, and prioritization.
[ac-button size=”large” color=”orange” style=”flat” icon=”fa-link” url=”https://www.2daygeek.com/how-to-enable-http2-0-support-on-nginx-web-server/” target=”_blank”]How to Enable HTTP/2.0 Support on Nginx Web Server[/ac-button]
On February 17, 2015 HTTP/2 was approved and May 14, 2015 published. HTTP/2 was integrated with Apache 2.4.17 version by enabling mod_http2 module also Curl 7.43.0 added support for HTTP/2. Almost, all the web browser started supporting HTTP/2 such as Chrome, Opera, Firefox, Internet Explorer 11 & Safari. As of November 2015 2.3% of the top 10 million websites supported HTTP/2.
HTTP/2 will support HTTP & HTTPS but most of the browsers only support https with HTTP/2. If you want to avail advantages & performance benefits of HTTP/2 better migrate to HTTPS instead of HTTP
- HTTP/2 is binary, instead of textual.
- It is fully multiplexed, sending multiple requests in parallel over a single TCP connection.
- It uses header compression HPACK to reduce overhead.
- It allows servers to “push” responses proactively into client caches instead of waiting for a new request for each resource
- It uses the new ALPN extension which allows for faster-encrypted connections since the application protocol is determined during the initial connection.
- It reduces additional round trip times (RTT), making your website load faster without any optimization.
- Domain sharding and asset concatination is no longer needed with HTTP/2.
- For more details about HTTP2 improvements
- For more details about HTTP2
- http working group link
1) Add Apache 2.4.17 PPA for Ubuntu/Mint
Add the below PPA to install Apache 2.4.17 on Ubunt/LinuxMint older version systems. No need to add the PPA to latest version of Ubuntu & LinuxMint systems because by default official package available.
$ sudo add-apt-repository ppa:ondrej/apache2 $ sudo apt-get update $ sudo apt-get install apache2
Check Apache2 version.
$ apache2 -v Server version: Apache/2.4.17 (Ubuntu)
By default CentOS 7.x, Fedora 23, 24 & openSUSE 42.1 official package available for Apache 2.4.17. For other distributon, we need to install manually, Also we need to install
mod_http2 module to RPM based system, which will enable automatically on apache while restarting.
2) Enable HTTP2 module
Use the below command to enable HTTP2 module in Apache.
[Enable HTTP2 module in Ubuntu/Debian/Mint System] $ sudo a2enmod http2 [Install HTTP2 module in RHEL/CentOS/Fedora 21 and older Systems] $ sudo yum install mod_http2 [Install HTTP2 module in Fedora 22 and later Systems] $ sudo dnf install mod_http2
4 Comments on “How to Enable HTTP/2.0 Support on Apache Web Server”
Have you found a repository for Centos 7.2? I would love to try this but not positive I want to try the compile method on a live site.
Yes, the latest CentOS version is 7.2 (1511). you can download the same one by visiting centos official website download link.
I may not have been clear, I’m referring to a repository that will allow you to install httpd 2.4.17 or above so you can take advantage of http2.
With any of the repositories, I’ve found you can only update apache to 2.4.6 and no higher versions using Yum. The only way I’ve seen to do it is to download the source and compile. Not something I’ve done a lot of so I’m hesitant. I may just bring up another VPS with Ubuntu and set it up to host my sites. I’ve always been a fan of CentOS, but sometimes this waiting for needed features such as this gets old.
Sorry Bruce, i misunderstood the query.
Yes, We need to compile from source to get 2.4.17 or latest apache version on CentOS.