From a60845e631e637d0a71fb941e7cd05e5cef5b685 Mon Sep 17 00:00:00 2001 From: Nick Santamaria Date: Mon, 19 Aug 2024 13:48:37 +1000 Subject: [PATCH] Added section-io-id to nginx log output --- images/nginx/Dockerfile | 1 + images/nginx/append/http-log-format.conf | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 images/nginx/append/http-log-format.conf diff --git a/images/nginx/Dockerfile b/images/nginx/Dockerfile index 68e045c28..bd52888ee 100644 --- a/images/nginx/Dockerfile +++ b/images/nginx/Dockerfile @@ -19,6 +19,7 @@ COPY content /etc/nginx/conf.d/drupal/content # Add server append directives. COPY append/server_append-healthz.conf /etc/nginx/conf.d/drupal/server_append-healthz.conf +COPY append/http-log-format.conf /etc/nginx/conf.d/http-log-format.conf RUN fix-permissions /etc/nginx \ && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \ diff --git a/images/nginx/append/http-log-format.conf b/images/nginx/append/http-log-format.conf new file mode 100644 index 000000000..9bc68a2e3 --- /dev/null +++ b/images/nginx/append/http-log-format.conf @@ -0,0 +1,5 @@ + log_format sdp '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for" ' + '"$http_x_section_io_id"'; + access_log /dev/stdout sdp;