From 5eac025ffed6698faa7c1bb4377b13ba15a90d2c Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Tue, 12 Dec 2023 10:52:18 -0800 Subject: [PATCH] fix stream module load, add logging format to streams --- nginx.conf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nginx.conf b/nginx.conf index 75aac7b..93bf762 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,6 +1,7 @@ user nginx; worker_processes auto; pcre_jit on; +load_module /usr/lib/nginx/modules/ngx_stream_module.so; events { worker_connections 768; } @@ -38,8 +39,11 @@ http { } stream { # logging - access_log access.log; - error_log error.log; + log_format basic '$remote_addr:$remote_port - $time_local ' + '$protocol stat:$status bs:$bytes_sent br:$bytes_received ' + st:'$session_time'; + access_log access.log basic; + error_log error.log basic; # include stream include stream/*.conf;