From 708d4e64fc6b3d8f0399d00ab1ec93f8767aa526 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 18 Sep 2025 17:37:55 -0700 Subject: [PATCH] httpd / website: adjust apache headers so logging works We need to tell apache to use the X-Real-Ip we set at the first proxy level for remoteipheader. This will get it to log the correct remote ip in logs. We can also then re-enable the fix for lists/duplicate headers with no problems. Signed-off-by: Kevin Fenzi --- roles/httpd/website/templates/website.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/httpd/website/templates/website.conf b/roles/httpd/website/templates/website.conf index ba0d3efa0b..ba942346cb 100644 --- a/roles/httpd/website/templates/website.conf +++ b/roles/httpd/website/templates/website.conf @@ -63,11 +63,13 @@ SetOutputFilter DEFLATE {% endif %} + # tell apache to use X-Real-Ip for the real ip this request came from + RemoteIPHeader X-Real-Ip # Do not add proxy headers here as they were already added when we # first got the request and sent it to anubis. This fixes some applications # (like mailman/django) that don't deal well with duplicate x-forwarded-for # entries and keeps the non anubis behavior. - #ProxyAddHeaders off + ProxyAddHeaders off Include "conf.d/{{ site_name }}/*.conf"