In this article, we will delve into the process of activating HTTP/2 for Apache through WHM and the command line.
Let us discuss the two methods for activating HTTP/2:
Method 1:
The graphical user interface makes it easy to activate HTTP/2 if you are using WHM with EasyApache 4.
- Log in to WHM using root credentials.
- Choose the “Software” section and click on the “EasyApache 4” sub-option.

- Click on the “Customise” button.

- Select the “Apache Modules” section.
- Search for the “mod_http2” module.
- Check the box to enable HTTP2.

- If prompted with a warning, click “Yes” to confirm.

- Go to the “Review” tab.

- Click the “Provision” button to apply changes.

- Wait for EasyApache to complete the build process.
- “Restart” Apache to apply the HTTP/2 configuration.

Method 2:
If you are handling Apache directly on a Linux server without WHM, you will need to switch your Apache Multi-Processing Module (MPM) to one compatible with HTTP/2, such as “mod_mpm_event.” This method is suitable for advanced or CLI-based setups.
- Access the server by logging in as the root user.
- Check the currently installed MPM module to determine which one is active. Execute one of the following commands depending on your system:
httpd -M | grep mpm
Or, if apache2ctl is available:
apache2ctl -M | grep mpm
Look for output such as “mpm_prefork_module”, “mpm_itk_module,” or other MPM modules.
- Uninstall the incompatible MPM modules using the “yum” package manager. This is necessary because modules like “prefork” and “itk” are not well-suited with HTTP/2.
Run the following commands:yum remove ea-apache24-mod_mpm_prefork yum remove ea-apache24-mod_mpm_itk
Confirm the removal when prompted by typing “y” and pressing Enter.
- Now, install the required modules for HTTP/2 support:
yum install ea-apache24-mod_mpm_event ea-apache24-mod_http2
This ensures Apache uses the event MPM and loads the “mod_http2” module.
- To implement the changes, “Restart” Apache with the following command:
systemctl restart httpd
By following this simple guide, you will successfully replace unsuitable MPM modules, activate HTTP/2, and expand your server for better performance. Hope you liked the two methods of activating HTTP/2 for Apache through WHM and CMD. If you still find issues in your hosting experience, feel free to contact our 24/7 technical support team.
Managing databases too? Learn How to activate a MySQL Profile in WHM