How to enable HTTP2 support in Apache

How to enable HTTP2 support in Apache

Date posted: 25/09/2019

Objective:-

HTTP/2 is a major revision of the HTTP network protocol used by the World Wide Web. It was derived from the earlier experimental SPDY protocol, originally developed by Google. HTTP/2 was developed by the Hypertext Transfer Protocol working group httpbis of the Internet Engineering Task Force.

Ref link – https://developers.google.com/web/fundamentals/performance/http2/

In this article, we’re going to explain about enabling http2 protocol for your website.

Prerequisite :

CentOS 7.7
Apache
Website with SSL installed

If your domain doesn’t use SSL already, please make sure to install Let’s Encrypt Free SSL on your domain.

Step1: Enable http2 in apache ssl configuration

To enable HTTP/2 protocol, you need to edit existing SSL configuration. In CentOS you can find the file at /etc/httpd/conf/httpd-le-ssl.conf

Add the following line inside virtual host directive

Protocols h2 h2c http/1.1

Step2: Verify Syntax

# apachectl -t<br> Syntax OK

Step3: Restart Apache

systemctl restart httpd

Step4: Verify HTTP/2 Support

There is an awesome website where you can verify the website is supporting HTTP/2 or not.

https://http2.pro

For instance https://google.com output as follows

Thanks for using pheonix solutions.

Did you find this tutorial helpful? Please do share with your friends.

admin

Our team has expertise across software and web development, WordPress, e-commerce, mobile applications, UI/UX, cloud and infrastructure, DevOps, CI/CD, API integration, security, testing, automation, and technical support. The team also works with AI-based software solutions, LLMs, AI workflows, AI agents, and intelligent application development to help businesses automate processes and build smarter digital solutions. We focus on developing, deploying, maintaining, and optimising secure, scalable, and reliable technology solutions while helping businesses adopt modern technologies and drive digital transformation.

Leave a Reply

Scroll to Top