nginx: Improve logging
This commit is contained in:
parent
8ebbe7b9dd
commit
80193701a2
1 changed files with 14 additions and 0 deletions
|
@ -9,6 +9,20 @@
|
|||
recommendedGzipSettings = true;
|
||||
recommendedBrotliSettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
|
||||
commonHttpConfig = ''
|
||||
map $remote_addr $remote_addr_anon {
|
||||
~(?P<ip>\d+\.\d+\.\d+)\. $ip.0;
|
||||
~(?P<ip>[^:]+:[^:]+): $ip::;
|
||||
default 0.0.0.0;
|
||||
}
|
||||
|
||||
log_format combined_anon '$remote_addr_anon - $remote_user [$time_local] '
|
||||
'"$request" $status $body_bytes_sent '
|
||||
'"$http_referer" "$http_user_agent"';
|
||||
|
||||
access_log logs/access.log combined_anon;
|
||||
'';
|
||||
};
|
||||
|
||||
networking.firewall.interfaces =
|
||||
|
|
Loading…
Reference in a new issue