We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

Page tree
Skip to end of metadata
Go to start of metadata

Overview

The mod_http2 Apache module provides HTTP/2 support for the Apache HTTP server. 

Important:

Most browsers only support HTTP/2 via encrypted (https) connections. 

Usage

This module can increase the loading speed and security of your web pages. To obtain these benefits, you must adjust your server's configuration.

Note:

HTTP/2 is resource-intensive and can increase your server's memory usage.

You can edit the mod_http2 Apache module's .conf file at the following location:

/etc/apache2/conf.d/http2.conf 

For more configuration information, read Apache's mod_http2 documentation

Requirements

This module requires EasyApache 4 and Apache 2.4.  

Compatibility

The mod_http2 Apache module is not compatible with 32-bit CentOS 6 systems or the DSO PHP handler. This module also isn't compatible with these other Apache modules:

  • mod_mpm_itk

  • mod_mpm_prefork 

On new installations of cPanel & WHM, the system installs the mod_mpm_prefork module by default. To check the MPMs that your system uses, run the following command:

rpm -qa | grep mpm

The output may resemble the following example:

ea-apache24-mod_mpm_prefork-2.4.34-3.el7.cloudlinux.x86_64

How to install or uninstall mod_http2

In the interface

Install or uninstall the mod_http2 Apache module with WHM's EasyApache 4 interface (WHM >> Home >> Software >> EasyApache 4). 

On the command line

You must manually uninstall the mod_mpm_prefork or mod_mpm_itk modules and install either the worker or event MPM for the mod_http2 Apache module to work correctly.  To do this, perform the following steps as the root user:

  1. Open a yum shell session. To do this, run the yum shell command.

    Note:

    For more information about yum shell, read the man7.org Yum documentation.

  2. Run either of the following series of commands:

    > remove ea-apache24-mod_mpm_prefork
    > install ea-apache24-mod_mpm_event ea-apache24-mod_http2
    > run
    > remove ea-apache24-mod_mpm_itk ea-apache24-mod_mpm_prefork
    > install ea-apache24-mod_mpm_event ea-apache24-mod_http2
    > run

    The system will display a list of packages to remove and install and prompt you to confirm that you wish to perform this action.

  3. Enter y to remove and install the specified packages. When the system completes this task, a Finished Transaction message will appear.
  4. Exit the yumshell session. To do this, run the exit command.

To uninstall the mod_http2 Apache module in EasyApache 4, run the following command: 

yum remove ea-apache24-mod_http2


Additional documentation

There is no content with the specified labels

There is no content with the specified labels

There is no content with the specified labels