From 1e5e02d1042147e42b11df66c9f62d9c4b5f260c Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 12 Oct 2024 21:51:13 +1100 Subject: [PATCH] Add stream configuration --- etc/nginx/include.d/http.conf | 2 +- etc/nginx/include.d/stream.conf | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 etc/nginx/include.d/stream.conf diff --git a/etc/nginx/include.d/http.conf b/etc/nginx/include.d/http.conf index e3acba0..8016e9f 100644 --- a/etc/nginx/include.d/http.conf +++ b/etc/nginx/include.d/http.conf @@ -15,5 +15,5 @@ http { #gzip on; - include /etc/nginx/conf.d/*.conf; + include /etc/nginx/http.d/*.conf; } diff --git a/etc/nginx/include.d/stream.conf b/etc/nginx/include.d/stream.conf new file mode 100644 index 0000000..da300b0 --- /dev/null +++ b/etc/nginx/include.d/stream.conf @@ -0,0 +1,14 @@ +stream { + log_format basic '$remote_addr [$time_local] ' + '$protocol $status $bytes_sent $bytes_received ' + '$session_time'; + + log_format proxy '$time_local: $remote_addr ' + '$protocol $status $bytes_sent $bytes_received ' + '$session_time "$upstream_addr" ' + '"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"'; + + proxy_protocol on; + + include /etc/nginx/stream.d/*.conf; +}