diff options
author | Dessalines <tyhou13@gmx.com> | 2019-12-13 18:38:30 -0800 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-12-13 18:38:30 -0800 |
commit | e4cea91ea84c0f0ab04e817fa4ad7a9a13eecf7e (patch) | |
tree | 453e7711fdf6a6938f41afde56f234e6d9db9cf8 /ansible/templates | |
parent | cffbb7cd5830528b18f71f583aa35e688a296600 (diff) |
Fix nginx config.
Diffstat (limited to 'ansible/templates')
-rw-r--r-- | ansible/templates/nginx.conf | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/ansible/templates/nginx.conf b/ansible/templates/nginx.conf index a484594e..4af5be01 100644 --- a/ansible/templates/nginx.conf +++ b/ansible/templates/nginx.conf @@ -72,16 +72,17 @@ server { expires max; } } - # Anonymize IP addresses - # https://www.supertechcrew.com/anonymizing-logs-nginx-apache/ - map $remote_addr $remote_addr_anon { - ~(?P<ip>\d+\.\d+\.\d+)\. $ip.0; - ~(?P<ip>[^:]+:[^:]+): $ip::; - 127.0.0.1 $remote_addr; - ::1 $remote_addr; - default 0.0.0.0; - } - log_format main '$remote_addr_anon - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" "$http_user_agent"'; - access_log /dev/stdout main; } + +# Anonymize IP addresses +# https://www.supertechcrew.com/anonymizing-logs-nginx-apache/ +map $remote_addr $remote_addr_anon { + ~(?P<ip>\d+\.\d+\.\d+)\. $ip.0; + ~(?P<ip>[^:]+:[^:]+): $ip::; + 127.0.0.1 $remote_addr; + ::1 $remote_addr; + default 0.0.0.0; +} +log_format main '$remote_addr_anon - $remote_user [$time_local] "$request" ' +'$status $body_bytes_sent "$http_referer" "$http_user_agent"'; +access_log /dev/stdout main; |