WHM / cPanel
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. 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:
rpm --import https://repo.botguard.net/botguard.gpg
Add the BotGuard repository to the system repositories:
yum-config-manager --add-repo https://repo.botguard.net/BotGuard.repo
Clear the packages cache:
yum clean all
Install the BotGuard WHM / cPanel plugin:
yum install botguard-whm
BotGuard module for EasyApache will also be installed as a dependency — ea-apache24-mod_botguard. Restart your Apache Server:
/usr/local/cpanel/scripts/restartsrv_httpd
Nginx support in WHM / cPanel
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.conf
comment out the line loading the module (add a # symbol at the beginning of the line), so that it looks as follows:# LoadModule botguard_module modules/mod_botguard.so
Restart your Apache web server:/usr/local/cpanel/scripts/restartsrv_httpd
- Remove the cron job for Engintron. To do this, in the file
/etc/crontab
comment out the appropriate line. It should look like this:# * * * * * root /etc/nginx/utilities/https_vhosts.sh >> /dev/null 2>&1
Restart the cron scheduler:service crond restart
End any Engintron tasks that may have remained running:killall -9 https_vhosts.sh
- At the start of the
/etc/nginx/nginx.conf
file, add a line to load the BotGuard module for Nginxinclude /usr/share/nginx/modules/mod-botguard.conf;
and restart the Nginx web server:service nginx restart
- Make sure the system time is in sync with the precision time servers:
yum install chrony timedatectl set-ntp true
- Start the service to sync Apache and Nginx configuration files:
chkconfig engintron-sync on service engintron-sync restart
Configuring the parameters of the WHM / cPanel BotGuard plugin
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 the BotGuard Integration Settings form fields and press the Apply
button:
You can request and receive an API Key ("API Key") in the partners section of the botguard.net website. 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 configure the rules for the bot traffic management:
Comments
Comments for this post are closed.