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 <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi
2025-09-18 17:37:55 -07:00
parent 1051fb0bb6
commit 708d4e64fc

View File

@@ -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"
</VirtualHost>