If you don’t know, ask – if you know, share! ~ opensource mindset
by Marco Bravo
When configuring Apache X-Forwarded-For take in consideration the differences for Apache versions 2.2 and 2.4.
Example to allow specific IP addresses (Apache 2.4):
<Location "/restricted-path">
SetEnvIF X-Forwarded-For "1.1.1.1" AllowIP
SetEnvIF X-Forwarded-For ^10\. AllowIP
<RequireAny>
Require env AllowIP
</RequireAny>
</Location>
References:
tags: apache - logs - config - forwarded