How to Enable HTTP/2.0 Support on Apache Web Server

3) Enable HTTP2 Support

By default, the HTTP/2 protocol support is not added in apache and we need to add the below lines to apache2.conf file for global access. If you want to enable to particular website you can add it to corresponding virtualhost (Like 2daygeek.conf).

[For HTTPS Support]
Protocols h2 http/1.1

[For HTTP Support]
Protocols h2c http/1.1

Restart Apache Web Server on SysVinit systems to check further.

$ sudo service apache2 restart          [Debian/Mint/Ubuntu]
$ sudo service httpd restart            [RHEL/CentOS/Fedora]

Restart Apache Web Server on systemd systems to check further.

$ sudo systemctl restart apache2.service          [Debian/Mint/Ubuntu]
$ sudo systemctl restart httpd.service            [RHEL/CentOS/Fedora]

4) Verify HTTP2 module

All the configuration got over, now times to check the status whether its working or not.

[ac-box color=”lred” icon=”fa-exclamation-circle”]
All the browsers are support HTTP2 with HTTPS Protocol. So, Make sure you should install HTTPS support on your server to enjoy/avail the HTTP2 features.

See the below screen shot, here i’m going to check via Firefox browser. how to check >> Tools >> Web Developer >> Network >> Choose the domain name “In my case its (localhost) with 200 GET status code”. Also you can verify by adding SPDY Indicator Add-on in Mozilla Firefox browser.
Alternatively we can check by Google chrome browser by navigating the link chrome://net-internals/#http2
See the detailed info from Google Chrome browser.
Alternatively we can check via curl & nghttp commands.

# Checking HTTP2 via nghttp #
$ sudo nghttp -uv http://localhost

# Checking HTTP2 via curl #
$ sudo curl -v --http2 http://localhost

See the below screen shot.
Hope, here after you also will migrate your server to HTTP2 for super fast & safer Internet.

4 Comments on “How to Enable HTTP/2.0 Support on Apache Web Server”

  1. 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.

      1. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *