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
Other
3.97k stars 477 forks source link

[INSTALLATION]"if" directive is not allowed #440

Closed rafalohaki closed 3 years ago

rafalohaki commented 3 years ago

I installed fresh nginx. Was copy pasting step 1-6 root@vmi547555:/usr/local/sbin# sudo nginx -t nginx: [emerg] "if" directive is not allowed here in /etc/nginx/bots.d/blockbots.conf:58 nginx: configuration file /etc/nginx/nginx.conf test failed

mitchellkrogza commented 3 years ago

Some default nginx.conf files with different distro's are formatted differently, the setup tool tries to cater for most but it cannot cater for all. Just follow manual installation for such cases.