How to Install HTTP/2 in WebHost Manager (WHM)

If you have just purchased your VPS or Dedicated server account, then congratulations you do not need to install HTTP/2 as it is already included. However, if you need to install it then it is a fairly simple process. You will need to have EasyApache 4 please review the instructions and conditions below if you need to install HTTP/2.

Install HTTP/2

The installation of HTTP/2 on a VPS or Dedicated server account requires that you have root access. Make sure that you have also performed a complete backup before continuing.

  1. Login to SSH as the root user
  2. Run the following command:
    yum install ea-apache24-mod_http2

Enable HTTP/2 in Easy Apache4

  1. Log into Web Host Manager (WHM)
  2. Select EasyApache 4
  3. Beside Currently Installed Packages, select Customize
  4. Select Apache Modules
  5. Search “http2”
  6. Toggle mod_http2 to blue
  7. Select Yes if you’re prompted to remove conflicting packages such as PHP 7.1 and a Multi-Processing Module (MPM) package, Continue, and select another Apache MPM package
  8. Select Review at the bottom
  9. Select Provision
  10. Select Done
Select mod_http2 in Easy Apache 4
Toggle to install the HTTP/2 Apache module

Important conditions for HTTP/2 installation

  • If you are using NGINX web server configured for port 80, you do not need to install HTTP/2 support for Apache as it is included in the default NGINX configuration. The installation of HTTP/2 in this type of configuration will cause secure connection issues with the Apple Safari internet browser in the Mac Operating System (OS 10+).
  • If you install NGINX for your InMotion Hosting account, then it will automatically remove the HTTP/2 package for the Apache Web Server.
  • Remember that the domain using HTTP/2 must have a valid SSL certificate for HTTP/2 to work properly.
  • Apache offers three MPM modules: Prefork, Worker, and Event. HTTP/2 on Apache does not support the mpm_prefork module but you can use mpm_worker in its place. You can find more information on the different Multi-processing Modules (MPM) here. The removal of the mpm_prefork module will affect how your PHP code is handled. If you are not familiar with the multiprocessing modules and how it affects your PHP installation then consult with an experienced developer. You can also find more information on the different PHP handlers in this article: Choosing the best PHP handler.You can remove the mpm_prefork module by using the following command:

    yum remove ea-apache24-mod_mpm_prefork

You should now be able to install HTTP/2 support on your VPS/Dedicated server account. For further reading on enabling HTTP/2 in Apache, please see How to enable HTTP/2 support in Apache.

InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

Was this article helpful? Join the conversation!