From d9950661efaeb6eed82af810b69df3581639a145 Mon Sep 17 00:00:00 2001 From: Tine Date: Tue, 5 Nov 2024 21:37:02 +0100 Subject: [PATCH] fix: access log --- root/etc/nginx/nginx.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/root/etc/nginx/nginx.conf b/root/etc/nginx/nginx.conf index 7332fd9..7b48a84 100644 --- a/root/etc/nginx/nginx.conf +++ b/root/etc/nginx/nginx.conf @@ -4,7 +4,6 @@ pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf; error_log syslog:server=unix:/dev/log; -access_log syslog:server=unix:/dev/log combined_host; events { worker_connections 768; @@ -73,16 +72,18 @@ stream { $geoip2_data_longitude location longitude; } - log_format basic 'country=$geoip2_data_country_iso_code lat=$geoip2_data_latitude long=$geoip2_data_longitude ' + log_format geoip 'country=$geoip2_data_country_iso_code lat=$geoip2_data_latitude long=$geoip2_data_longitude ' 'ip=$remote_addr ' 'protocol=$protocol server_name=$ssl_preread_server_name upstream=$selected_upstream status=$status bytes_sent=$bytes_sent bytes_received=$bytes_received ' 'session_time=$session_time'; + server { listen 0.0.0.0:443 default_server; listen [::]:443 default_server; server_name _; proxy_pass $selected_upstream; + access_log syslog:server=unix:/dev/log geoip; proxy_protocol on; include /etc/nginx/partials/server.conf;