Anonymize IP logging
Dieter Knopf
dieterknopf at googlemail.com
Fri May 4 04:29:47 UTC 2012
2012/5/3 Alexandr Gomoliako <zzz at zzz.org.ua>:
> Or perl code, which is even easier, than lua :)
>
> perl_set $anon_addr ' sub {
> use Digest::MD5 qw(md5_hex);
> my $r = shift;
> md5_hex $r->remote_addr
> } ';
Thanks for the info. Is there a way to configure this globally for all vhosts?
I have already this lines in my nginx.conf:
log_format combined_noip '127.0.0.1 - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
So i would need the $anon_addr instead of the 127.0.0.1.
Thanks
More information about the nginx
mailing list