Open luk911 opened 8 years ago
I try to block bad referrer, this one: referrer: "http://www.muzformat.com/index.php?productID=807"
I change blacklist.conf
to:
map $http_referer $bad_referer { default 0; ~(?i)(adult|babes|diamond|forsale|girl|jewelry|love|nudit|organic|poker|porn|poweroversoftware|sex|teen|webcam|zippo|casino|replica|muzformat) 1; }
include
if ($bad_referer) { return 444; }
in my conf, but bot are style there.
and can we consolidate this rule in 000-default.conf for all domain ? like this:
server { listen 80; # IPv4 servername ; return 444; } server { listen 80 default_server; # IPv4 if ($bad_bot) { return 444; } if ($bad_referer) { return 444; } if ($not_allowed_method) { return 405; } }
server { listen 80; # IPv4 servername ; return 444; }
server { listen 80 default_server; # IPv4 if ($bad_bot) { return 444; } if ($bad_referer) { return 444; } if ($not_allowed_method) { return 405; } }
Comment out the "geo" section in blacklist.conf, it overwrites $bad_referer variable with empty string.
I try to block bad referrer, this one: referrer: "http://www.muzformat.com/index.php?productID=807"
I change blacklist.conf
to:
include
in my conf, but bot are style there.
and can we consolidate this rule in 000-default.conf for all domain ? like this: