feat: split logs into human-readable (stdout) and json (file) for better observability
This commit is contained in:
parent
9e7decd6de
commit
368cda2b76
|
|
@ -2,7 +2,7 @@
|
||||||
enabled = true
|
enabled = true
|
||||||
port = http,https
|
port = http,https
|
||||||
filter = nginx-modsec
|
filter = nginx-modsec
|
||||||
logpath = /var/log/nginx/access.log
|
logpath = /var/log/nginx/access_json.log
|
||||||
maxretry = 3
|
maxretry = 3
|
||||||
bantime = 3600
|
bantime = 3600
|
||||||
findtime = 600
|
findtime = 600
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,12 @@ http {
|
||||||
# Compression (Brotli + Gzip)
|
# Compression (Brotli + Gzip)
|
||||||
include /etc/nginx/snippets/compression.conf;
|
include /etc/nginx/snippets/compression.conf;
|
||||||
|
|
||||||
# Logging JSON (Detailed)
|
# Logging JSON (Detailed) - For Fail2Ban / Analysis
|
||||||
include /etc/nginx/snippets/log_formats.conf;
|
include /etc/nginx/snippets/log_formats.conf;
|
||||||
access_log /var/log/nginx/access.log detailed_proxy;
|
access_log /var/log/nginx/access_json.log detailed_proxy;
|
||||||
|
|
||||||
|
# Logging Human Readable - For Docker Logs / User
|
||||||
|
access_log /dev/stdout combined;
|
||||||
|
|
||||||
# SSL Settings (Global)
|
# SSL Settings (Global)
|
||||||
ssl_session_cache shared:SSL:50m;
|
ssl_session_cache shared:SSL:50m;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue