Ist es möglich, „LocationMatch“ zu verwenden und Apache 2.4 die x-forwarded-for-IP-Adresse verwenden zu lassen? Ich kann hierfür weder „mod_rpaf“ noch „mod_remoteip“ verwenden.
Ich habe das LogFormat „apache.conf“ so konfiguriert, dass die x-forwarded-for-IP verwendet wird. Das funktioniert, aber Apache „LocationMatch“ zieht immer noch die LoadBalancer-IP.
<LocationMatch "(?i).*/CFIDE">
Order Deny,Allow
Deny from all
Allow from 10.0.0.0/8 # I need this 'Allow' to use the x-forwared-for IP
</LocationMatch>
Antwort1
Ich habe mein eigenes Problem mithilfe von „SetEnvIF X-FORWARDED-FOR“ gelöst.
<LocationMatch "(?i).*/CFIDE">
SetEnvIF X-FORWARDED-FOR "123.456.654.321" AllowIP
Order Deny,Allow
Deny from all
Allow from env=AllowIP
</LocationMatch>