From 2ebc5de4414f849ae8b9bca3016f6b46d6236ec6 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 25 Apr 2019 13:22:49 +0200 Subject: [PATCH] Nginx now logs original proxy src/dst hosts --- front/nginx.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/front/nginx.conf b/front/nginx.conf index d6205af1e..84daf2ef2 100644 --- a/front/nginx.conf +++ b/front/nginx.conf @@ -1,4 +1,12 @@ +set_real_ip_from 0.0.0.0/0; +real_ip_header X-Forwarded-For; +log_format upstreamlog + '[$time_local] $remote_addr -> $proxy_host:$upstream_addr ' + '"$request" $status $body_bytes_sent ' + '"$http_referer" "$http_user_agent"'; +access_log /var/log/nginx/access.log upstreamlog; + upstream back { server back_1:3000; server back_2:3000;