mitchellkrogza / nginx-ultimate-bad-bot-blocker

Nginx Block Bad Bots, Spam Referrer Blocker, Vulnerability Scanners, User-Agents, Malware, Adware, Ransomware, Malicious Sites, with anti-DDOS, Wordpress Theme Detector Blocking and Fail2Ban Jail for Repeat Offenders

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nginx: [emerg] unknown directive "20.213.20.213" in /etc/nginx/bots.d/blacklist-ips.conf:96

serg-avens opened this issue · comments

Hello! I would like to thank you for such a useful script!
I have an issue with blacklist-ips.conf.
Any help would be very apreciated.

I've read here but wouldn't like to reinstall nginx from the scratch.

After adding the third string into vhost.d file

include /etc/nginx/bots.d/ddos.conf;
include /etc/nginx/bots.d/blockbots.conf;
include /etc/nginx/bots.d/blacklist-ips.conf;

NGINX doesn't start with message
nginx: [emerg] unknown directive "20.213.20.213" in /etc/nginx/bots.d/blacklist-ips.conf:97

There is only one uncommented line "20.213.20.213 1;"

The same error appears when i include the non modified original blacklist-ips.conf, saying "wrong directive" on
38.0.0.0/8 0;

CentOS nginx version: nginx/1.20.2

Do not add the include include /etc/nginx/bots.d/blacklist-ips.conf; it is already loaded in the main blocker file conf.d/globalblacklist.conf simply make changes to blacklist-ips.conf and reload nginx.

Thank you very much!
Great script. The site became very fast after kicking bots out! MySQL was too overloaded before.