I'm trying to use the "map" directive to test for a set on know ip's as crawlers, to prevent their requests form being logged.
in the http section
map $realip_remote_addr $crawlerip {
default 0;
192.168.10.10 1;
192.168.10.6 1;
192.168.10.5 1;
}
(not the real ip's of course)
in the server section
location / {
if ($crawlerip = 1) {
access_log off;
}
<do something>
}
Not sure if i'm using the directive correctly. Connections are proxied from varnish.
in the http section
map $realip_remote_addr $crawlerip {
default 0;
192.168.10.10 1;
192.168.10.6 1;
192.168.10.5 1;
}
(not the real ip's of course)
in the server section
location / {
if ($crawlerip = 1) {
access_log off;
}
<do something>
}
Not sure if i'm using the directive correctly. Connections are proxied from varnish.