Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»General Articles»How to Enable HTTP/2.0 in Apache

    How to Enable HTTP/2.0 in Apache

    RahulBy RahulDecember 11, 20152 Mins Read

    HTTP/2 (HTTP/2.0) is the major upgrade over older version HTTP/1.1 protocol.HTTP/1 was released in 1997 and after a long time the HTTP/2 is released in 2015. HTTP/2 protocol is based on SPDY (generally known as speedy). Some of the key improvements of HTTP/2 are:

    • Server push: Server will pro-actively sent components to clients, So clients doesn’t need to wait for sending requests to server.
    • Multiplexing: Reducing number of active connection by bundling multiple HTTP requests from client and sent to server.
    • Encryption: efficiently use to encryption with TLS protocol in HTTP/2 over HTTP/1.1.
    • HTTP header compression: Compressed headers will reduce the overhead of additional requests to web server.

    Enable HTTP2.0 in Apache

    This article will help you to enable HTTP/2.0 in Apache web server on CentOS / Red Hat/ Debian and Ubuntu systems.

    Install or Update Apache

    HTTP/2 protocol supported over Apache version >=2.4.17. So make sure that your Apache version supporting HTTP/2 protocol. If you have not installed Apache or using older version upgrade it first. Use the following commands to add PPA for installing latest Apache2 version on your Ubuntu system.

    $ sudo apt-get install python-software-properties
    $ sudo add-apt-repository ppa:ondrej/apache2
    $ sudo apt-get update
    $ sudo apt-get install apache2
    

    Verify Apache Version

    After successful installation of Apache2 web server on your system, make sure you have Apache >=2.4.17, Earlier version does not supports HTTP/2 protocol.

    $ apache2 -v
    
    Server version: Apache/2.4.17 (Ubuntu)
    Server built:   2015-11-05T00:00:00
    

    Enable HTTP/2 in Apache

    HTTP/2 protocol requires SSL/TLS virtual hosts. You can’t use HTTP/2 protocol without SSL/TLS enabled websites. Now edit your website VirtualHost and add http2 keyword in listen section.

    $ sudo a2enmod http2
    $ sudo service apache2 restart
    

    Verify HTTP/2

    Now configure a VirtualHost with SSL for your domain and use following online tool for testing HTTP/2 support on your website.

    https://tools.keycdn.com/http2-test

    Apache HTTP/2.0 HTTP2
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow To Install PHP 7.4 – 7.0 on Ubuntu 18.04
    Next Article How to Install Ruby 2.1.8 on CentOS & RHEL using RVM

    Related Posts

    How to run “npm start” through docker

    2 Mins Read

    Filesystem Hierarchy Structure (FHS) in Linux

    Updated:July 1, 20222 Mins Read

    What is CPU? – Definition, Types and Parts

    3 Mins Read

    How to Install Ionic Framework on Ubuntu 22.04

    3 Mins Read

    What is the /etc/hosts file in Linux

    Updated:June 27, 20222 Mins Read

    Creating DMARC Record for Your Domain

    Updated:June 29, 20223 Mins Read

    4 Comments

    1. James Kiarie on June 19, 2020 10:01 am

      Incomplete guide. You need to edit the virtual host file and then restart apache2.

      Reply
    2. dman101 on June 28, 2018 2:15 am

      Now edit your website VirtualHost and add http2 keyword in listen section.

      What kind of instruction is this? it’s useless

      Reply
      • Rahul K. on June 28, 2018 6:08 am

        Hi, Where we can write listen in Apache VirtualHost? I think listen is related to Nginx.

        Reply
    3. Anil on December 14, 2015 7:13 am

      Thanks for the info….

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to run “npm start” through docker
    • Filesystem Hierarchy Structure (FHS) in Linux
    • How to accept user input in Python
    • What is difference between var, let and const in JavaScript?
    • What is CPU? – Definition, Types and Parts
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.