[tor-mirrors] Privacy respecting logging

Adam Quenneville adam.quenneville at freemirror.org
Tue Oct 23 22:43:26 UTC 2018


Hi all,

You can surely use mods if need be, but for Apache2, I've found it's 
easiest just to use the CustomLog directive:

CustomLog /path/to/desired/log/location "0.0.0.0 %l %u %t \"%r\" %>s %b"

This just makes every user show up as 0.0.0.0. Which makes it plug and 
play with something like AWstats, or any other log-analysis software.

Simple and fast. Works for us.

Adam

-- 

Adam Quenneville
Founder, The Free Mirror Project <https://FreeMirror.org/>
/"Enabling the free exchange of information and ideas."/


On 2018-10-23 6:13 PM, Alexander Dietrich wrote:
> On 2018-10-23 23:21, Traumschule wrote:
>>
>> For apache you can use the libapache2-mod-removeip. For nginx
>> AFAIK there's no such module. Found this example to modify log_format
>> https://www.hagen-bauer.de/2015/12/nginx-logfiles-anon.html in german.
>> If you know about better instructions in english, let us know!
>
> nginx logging is documented here:
> https://nginx.org/en/docs/http/ngx_http_log_module.html
>
> The default log format is given as:
>
> log_format combined '$remote_addr - $remote_user [$time_local] '
>                     '"$request" $status $body_bytes_sent '
>                     '"$http_referer" "$http_user_agent"';
>
> So if you wanted to suppress IP and user information, while staying 
> compatible with the Common Log Format, and drop the HTTP Referer and 
> User-Agent fields, you could add these lines to your nginx.conf:
>
> log_format privacy '- - - [$time_local] "$request" $status 
> $body_bytes_sent';
> access_log /var/log/nginx/access.log privacy;
>
> You may need to change the second line if your nginx log files are not 
> in /var/log/nginx.
>
> Kind regards,
> Alexander
> _______________________________________________
> tor-mirrors mailing list
> tor-mirrors at lists.torproject.org
> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-mirrors
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-mirrors/attachments/20181023/71d8d63a/attachment.html>


More information about the tor-mirrors mailing list