This guide explains how to enable Apache’s HTTP/2 module on a cPanel & WHM server. HTTP/2 allows a browser to request multiple website resources over one connection. The steps require server administrator access and a compatible Apache and PHP configuration.

Check compatibility first

HTTP/2 requires HTTPS with a valid certificate. In EasyApache 4, the http2 module is incompatible with the prefork and itk processing modules and with mod_ruid2. A processing module controls how Apache handles requests; changing it can also affect how PHP runs.

These instructions concern Apache on a cPanel server. A separate NGINX front end has its own HTTP/2 configuration.

Enable HTTP/2 through WHM

  1. Open Software > EasyApache 4 in WHM.

    EasyApache4

  2. Select Customise for the currently installed profile.

    customise

  3. Review Apache MPM and select a compatible processing module, such as event, only after confirming PHP compatibility.

  4. Under Apache Modules, select http2.

    apache modules

  5. If a conflict message appears, review the proposed changes. Stop and resolve dependencies if the removals would disrupt your sites.

    yes

  6. Open Review and check every package to be installed or removed.

    review

  7. Select Provision when the changes are correct, and wait for completion.

    provision

  8. Test the websites. If an Apache restart is required, use Restart Services > HTTP Server (Apache).

    restart

Install the module from the command line

This alternative applies only to cPanel EasyApache 4 servers running AlmaLinux or Rocky Linux that already have a compatible processing module and PHP handler. It is not a procedure for installing HTTP/2 on a server without cPanel.

Connect through SSH as root and run:

dnf install ea-apache24-mod_http2

Review the package manager’s proposed transaction before confirming. If it reports incompatible modules or proposes unexpected removals, stop and resolve the configuration through EasyApache 4. Do not remove the active processing module in a separate transaction.

If required after installation, restart Apache using cPanel’s service script:

/usr/local/cpanel/scripts/restartsrv_httpd

Check the result

Run httpd -M on the server and confirm that http2_module is listed with the expected processing module. Then open a website over HTTPS and use your browser’s network tools to check that requests use the h2 protocol. A module appearing in the list alone does not prove that a browser connection uses HTTP/2.