WHM / cPanel
BotGuard provides a WHM / cPanel integration plugin. When the plugin is installed, the BotGuard Apache web server protection module is activated. The control panel provides the appropriate configuration options for the WHM admin and cPanel user.
The module is provided as a package for CentOS 7 and above. The module is installed and updated in the standard way, using an SSH connection to the WHM server.
Import the BotGuard package digital signature key:
yum install --disablerepo botguard --enablerepo botguard-cloudlinux ea-apache24-botguard-mod_ssl ea-apache24-mod_botguard yum install botguard-whm
Nginx support in WHM / cPanel (optional)
The WHM / cPanel website control panel uses Apache as the web server. Some users prefer to use Nginx web server instead of Apache, which is not included in the standard configuration of the control panel. It is generally recommended to use Engintron for this task, which is an open source project.
BotGuard integration plugin supports Engintron. To integrate the plugin with Engintron additional steps need to be taken after installing the BotGuard plugin:
Install the BotGuard module for Nginx according to the instructions.
Disable Apache BotGuard module. To do this, in the file
/etc/apache2/conf.modules.d/10-botguard.confcomment out the line loading the module (add a # symbol at the beginning of the line), so that it looks as follows:
- Remove the cron job for Engintron. To do this, in the file /etc/crontab comment out the appropriate line. It should look like this:
- At the start of the /etc/nginx/nginx.conf file, add a line to load the BotGuard module for Nginx
- Make sure the system time is in sync with the precision time servers:
- Start the service to sync Apache and Nginx configuration files:
The plugin will be disabled after installation. Before using the plugin, it must be pre-configured. To configure the plugin, open the WHM web control panel and go to section Home » Plugins » BotGuard Bot Management:
Next, in the plugin parameters page, fill in your API key and assigned BotGuard servers and press the Apply button:
You can get an API Key in your account details at botguard.net. Fill in the fields of Primary and Secondary Servers with the addresses of BotGuard servers assigned to your account.
After installing the plugin, each user of this WHM server will gain access to the website protection settings and the corresponding menu section in the cPanel web control panel:
In the BotGuard Bot Management section, сPanel users can enable or disable protection for their websites:
After enabling protection, a cPanel user can view traffic details and configure the bot traffic management rules: