Integration Guide

This document describes the procedure for integrating your web site with the BotGuard Cloud. Depending on the software you use and your needs, a choice of several ways of integration are possible.

In case of difficulties in choosing the required integration option, contact the support. BotGuard engineers can help you to select optimal integration option. It is also possible to fully configure your server by our engineers efforts.


Web Server Plugins

The best point of integration of your web site with BotGuard is at the web server level.


To integrate the Nginx web server with the BotGuard service, you do not need to install additional software, you only need to make changes to the Nginx configuration files.

  1. Make sure that Nginx is compiled with the http_auth_request_module module by running the following command:
    2>&1 nginx -V | tr -- - 'n' | grep _module
    This command displays list of modules bundled with Nginx. If there is http_auth_request_module among this list, then everything is fine. Otherwise, try to install different Nginx version from system repository or official site.
  2. Download the example of BotGuard configuration file for Nginx. In the file nginx/conf.d/botguard.conf, replace BotGuard servers addresses by ones assigned to your website:
    server fail_timeout=1;
    server backup;
    Replace the by primary BotGuard host and by secondary one.
  3. Copy the contents of the nginx folder to the /etc/nginx directory on your server.
  4. You need to make changes in the configuration file of your web server (usually located in /etc/nginx/conf.d/default.conf or in /etc/nginx/sites-enabled/default). Add the line to the section "server { }":
    include botguard/botguard.conf;
  5. Verify that the setting is correct by running the command
    nginx -t
    As a result, it should print the message:
    nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
    nginx: configuration file /etc/nginx/nginx.conf test is successful
  6. Apply changes by running the command:
    service nginx restart

Plugin For WordPress Content Management System

BotGuard provides plugin for WordPress CMS. Plugin source code is available on GitHub.

The installation of the plugin is done by the usual way in WordPress:

  1. Download the plugin file.
  2. Go to the WordPress control panel. In the control panel go to the "Plugins" section and click the "Add New" button:

  3. On the "Add Plugin" page, click the "Upload Plugin" button:

  4. Click the "Browse" button, select the file, that was downloaded in step 1. Next, click the "Install Now" button:

  5. After a couple of seconds, the plugin will be installed. Click the "Activate Plugin" button:

  6. Go to the plug-in settings page. To do this, select "Settings" → "BotGuard" from the menu:

  7. Enter the address of the primary and secondary BotGuard server, check the "Enabled" checkbox, and click the "Save Changes" button.

    The necessary values for the addresses of BotGuard servers can be obtained on the BotGuard Dashboard.


Other PHP applications

BotGuard provides a library for the integration of the service with any web application written in PHP. The library is available on GitHub.