Introduction
The mod_cpanel Apache module replaces the Optimize .htaccess (AllowOverride) feature that was previously available in the Global Configuration section of WHM’s Apache Configuration interface. This module allows cPanel & WHM to manage specific Apache configurations more efficiently. Administrators can install or remove the module through the EasyApache 4 interface or by using command-line tools.
Prerequisites
Before proceeding, ensure that:
- You have root access to the server.
- You have access to the WHM interface.
- The server is running EasyApache 4.
- You have SSH access if you plan to use the command-line method.
- It is recommended to take a backup of Apache configurations before making changes.
Procedure
Install or Uninstall via WHM
- Log in to WHM as the root user.
- Navigate to:
WHM » Home » Software » EasyApache 4 - Search for mod_cpanel in the available Apache modules.
- To install the module:
- Enable mod_cpanel.
- Click Review and then Provision.
- To uninstall the module:
- Disable mod_cpanel.
- Click Review and then Provision.
Install via Command Line
Run the following command:
$ yum install ea-apache24-mod_cpanel
Uninstall via Command Line
Run the following command:
$ yum remove ea-apache24-mod_cpanel
Conclusion
You have successfully learned how to install or uninstall the mod_cpanel Apache module using either the EasyApache 4 interface in WHM or the command line. After making changes, verify that Apache is functioning correctly and review your website configurations to ensure they continue to operate as expected. Regularly maintaining Apache modules helps keep your server optimized and compatible with current cPanel & WHM features.