Last active
December 21, 2015 00:18
-
-
Save AdamGerthel/6218668 to your computer and use it in GitHub Desktop.
Apache mod_rpaf configuration used in combination with Varnish. When using Varnish the $SERVER variable remote_addr is set to the Varnish server IP instead of the client ip (site visitor). If Varnish is configured to send X-Forwarded-For headers containing the client IP, then mod_rpaf can use that information and set remote_addr to the client IP…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule rpaf_module> | |
RPAFenable On | |
# When enabled, take the incoming X-Host header and | |
# update the virtualhost settings accordingly: | |
RPAFsethostname On | |
# Define which IP's are your frontend proxies that sends | |
# the correct X-Forwarded-For headers: | |
RPAFproxy_ips 123.123.123.123 10.0.0.2 127.0.0.1 | |
# Change the header name to parse from the default | |
# X-Forwarded-For to something of your choice: | |
RPAFheader HTTP_X_FORWARDED_FOR | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment