Anonymized nginx access logs
This commit is contained in:
parent
93ec60a43f
commit
9de678984c
@ -69,8 +69,17 @@
|
|||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
|
|
||||||
appendHttpConfig = ''
|
commonHttpConfig = ''
|
||||||
server_names_hash_bucket_size 64;
|
server_names_hash_bucket_size 64;
|
||||||
|
map $remote_addr $remote_addr_anon {
|
||||||
|
~(?P<ip>\d+\.\d+\.\d+)\. $ip.0;
|
||||||
|
~(?P<ip>[^:]*:[^:]*(:[^:]*)?): $ip::;
|
||||||
|
default ::;
|
||||||
|
}
|
||||||
|
log_format combined_anon '$remote_addr_anon - $remote_user [$time_local] '
|
||||||
|
'"$request" $status $body_bytes_sent '
|
||||||
|
'"$http_referer" "$http_user_agent"';
|
||||||
|
access_log /var/log/nginx/access.log combined_anon;
|
||||||
'';
|
'';
|
||||||
|
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
|
Loading…
Reference in New Issue
Block a user