modules/nginx: log to syslog in logfmt format

This commit is contained in:
Max Headroom 2022-05-16 00:10:14 +02:00
parent 563efc95e4
commit 1d32eb782e
2 changed files with 4 additions and 0 deletions

View file

@ -23,6 +23,8 @@ in
server_names_hash_bucket_size 128;
proxy_headers_hash_max_size 4096;
proxy_headers_hash_bucket_size 128;
log_format fmt_loki 'host=$host remote_addr=$remote_addr remote_user=$remote_user request="$request" status=$status body_bytes_sent=$body_bytes_sent http_referer="$http_referer" http_user_agent="$http_user_agent"';
access_log syslog:server=unix:/dev/log,tag=nginx_access,nohostname fmt_loki;
'';
};
services.phpfpm.pools.www = {

View file

@ -23,6 +23,8 @@ in
server_names_hash_bucket_size 128;
proxy_headers_hash_max_size 4096;
proxy_headers_hash_bucket_size 128;
log_format fmt_loki 'host=$host remote_addr=$remote_addr remote_user=$remote_user request="$request" status=$status body_bytes_sent=$body_bytes_sent http_referer="$http_referer" http_user_agent="$http_user_agent"';
access_log syslog:server=unix:/dev/log,tag=nginx_access,nohostname fmt_loki;
'';
};
services.phpfpm.pools.www = {