[tor-mirrors] Privacy respecting logging
adam.quenneville at freemirror.org
Tue Oct 23 22:43:26 UTC 2018
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.
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:
> 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
> 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,
> tor-mirrors mailing list
> tor-mirrors at lists.torproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the tor-mirrors