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.81k stars 472 forks source link

[INSTALLATION] (nginx: [emerg] unknown directive) #472

Closed hafidzaini closed 2 years ago

hafidzaini commented 2 years ago

installed on FreeBSD 13.0-RELEASE-p11 amd64 blocking script working great but i get problem when whitelist my own domain.

nginx: [emerg] unknown directive "~*(?:\b)mywebsite\.com(?:\b)" in /usr/local/etc/nginx/bots.d/whitelist-domains.conf:42

~*(?:\b)mywebsite\.com(?:\b) 0; not working !~* ^(.+\.)?mywebsite\.com$ 0; still not working

how's the right regex ? thank you very much.

nginx

hafidzaini commented 2 years ago

problem solve moving the conf from server block to http block

killmasta93 commented 7 months ago

hi @hafidzaini im having same issue i put include /etc/nginx/bots.d/whitelist-ips.conf;

in the nginx.conf below the http block but keep getting the same issue?