GoAdmio

bot

Enable or disable malicious-bot blocking for one domain or for all domains

On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also


Overview

/go/bot turns the malicious-bot block on or off in the Apache or Nginx configuration of a GoAdmio domain. It:

The same setting can be chosen when an account is created (see create, --bot).


Quick start

# Enable bot blocking for one domain
/go/bot example.com Enable

# Disable it for all domains
/go/bot all 0

Syntax

/go/bot <domain|all> <action>
Argument Description
<domain> A hosted domain, or all for every domain.
<action> 1 or Enable turns the block on. Any other value turns it off.

[!WARNING] Only 1 and Enable enable the block. Enable is case-sensitive, and a missing or misspelled action (for example enable, on, or nothing) disables it.


Options

This command has no -- options, only the two positional arguments above.

Action value Result
1 Enable bot blocking
Enable Enable bot blocking
0 Disable bot blocking
Anything else, or empty Disable bot blocking

Output

The command prints nothing. To check the result, read the flag from the database:

sqlite3 /var/lib/sqlite/site.db "select Domain,Bot from Site"

Bot is 1 when blocking is enabled and 0 when it is disabled.

Each run also adds a line to /var/log/go/bot.log, for example:

[Nov 20 00:10:01]# bot example.com Enable

Examples

# Enable for one domain
/go/bot example.com Enable
# Disable for one domain
/go/bot example.com 0
# Enable for every hosted domain
/go/bot all 1

Troubleshooting

Symptom Likely cause Fix
Nothing happens for a domain /home/<domain>/www does not exist. The command exits silently. Check the domain name and that the account exists.
Bot blocking turned off unexpectedly The action was missing or not exactly 1 or Enable. Run again with 1 or Enable.
Change not visible in the site's behavior The web server did not reload. Run reload, or conf to rebuild all configuration.
Bot flag is set but the block does not work The configuration was not rebuilt. Run apache and nginx for the domain, or conf.

Details

Single domain

When a domain name is given, the command:

  1. Checks that /home/<domain>/www exists. If not, it exits without doing anything.
  2. Sets Bot=1 or Bot=0 for that domain in the Site table of /var/lib/sqlite/site.db.
  3. Rebuilds the domain's virtual host with apache and nginx.
  4. Reloads the web server with reload, with the note | Executed by bot.

All domains

When the domain is all, the command:

  1. Sets Bot=1 or Bot=0 for every row in the Site table.
  2. Rebuilds the Apache/Nginx configuration with conf.

The /home/<domain>/www check is not applied in this mode.

Known issues


See also

Command Description
bots Track all bot visits to your server (good and bad bots)
bottop Block bad bots from visiting your server
blacklist Block blacklisted IPs (bad bots and SSH brute-force attacks)
conf Rebuild the Apache/Nginx configuration in GoAdmio
reload Reload PHP-FPM and the active web server
create Create a GoAdmio account from the command line