It is fowarded by changing the log format to:
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
Where You substitute %{X-Forwarded-For}i for %U
In order for apache to use this value to allow/deny people you need to set it like the following:
SetEnvIfNoCase ^X-Forwarded-For ^1\.2\.3\.4 officeip
Order deny,allow
Deny from all
Allow from env=officeip
No comments:
Post a Comment