fix: access log

This commit is contained in:
Tine 2024-11-05 21:37:02 +01:00
parent 467d01a61b
commit d9950661ef
Signed by: mentos1386
SSH key fingerprint: SHA256:MNtTsLbihYaWF8j1fkOHfkKNlnN1JQfxEU/rBU8nCGw

View file

@ -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;