From 68d44714ac0dde6e4595fdfc58d22110cb2e2b09 Mon Sep 17 00:00:00 2001 From: AlexBa16 Date: Mon, 1 Jun 2026 16:23:30 +0200 Subject: [PATCH] C6 --- proxy/nginx.conf | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/proxy/nginx.conf b/proxy/nginx.conf index 459c8b1..8a902ba 100644 --- a/proxy/nginx.conf +++ b/proxy/nginx.conf @@ -8,6 +8,12 @@ http { sendfile on; server_tokens off; + log_format workshop '$remote_addr - $request ' + 'status=$status upstream=$upstream_addr ' + 'rt=$request_time urt=$upstream_response_time'; + + access_log /var/log/nginx/access.log workshop; + upstream backend_a { server backend-a:80; } @@ -36,7 +42,7 @@ http { try_files $uri $uri/ /index.html; } - location /service/a { + location = /service/a { proxy_pass http://backend_a/; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto http; @@ -47,14 +53,14 @@ http { proxy_pass http://backend_a/; } - location /service/b { + location = /service/b { proxy_pass http://backend_b/; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto http; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } - location /service/c { + location = /service/c { proxy_pass http://backend_c/; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto http; @@ -66,7 +72,7 @@ http { return 200 "ok\n"; } - location /internal/status { + location = /internal/status { access_log off; default_type text/plain;