Skip to content

WHM / cPanel

Installation

BotGuard provides a WHM / cPanel integration plugin. When the plugin is installed, the Blackwall 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 Blackwall package digital signature key:

rpm --import https://repo.botguard.net/botguard.gpg
Add the Blackwall 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 Blackwall WHM / cPanel plugin:
yum install --disablerepo botguard --enablerepo botguard-cloudlinux ea-apache24-botguard-mod_ssl ea-apache24-mod_botguard
yum install botguard-whm
Blackwall 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 (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.

Blackwall integration plugin supports Engintron. To integrate the plugin with Engintron additional steps need to be taken after installing the Blackwall plugin:

  1. Install the Blackwall module for Nginx according to the instructions.

  2. Disable Apache Blackwall 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
    

  3. 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:
    systemctl restart crond
    
    End any Engintron tasks that may have remained running:
    killall -9 https_vhosts.sh
    
  4. At the start of the /etc/nginx/nginx.conf file, add a line to load the Blackwall module for Nginx
    include /usr/share/nginx/modules/mod-botguard.conf;
    
    and restart the Nginx web server:
    systemctl restart nginx
    
  5. Make sure the system time is in sync with the precision time servers:
    yum install chrony
    timedatectl set-ntp true
    
  6. Start the service to sync Apache and Nginx configuration files:
    chkconfig engintron-sync on
    service engintron-sync restart
    

Configuration

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 » Blackwall Bot Management: whm-step1.png

Next, in the plugin parameters page, fill in your API key and assigned Blackwall servers and press the Apply button: whm-step2.png

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 Blackwall 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: whm-step3.png

In the Blackwall Bot Management section, сPanel users can enable or disable protection for their websites: whm-step4.png

After enabling protection, a cPanel user can view traffic details and configure the bot traffic management rules: whm-step5.png

Feedback