And in the apache server you need to have something like that in your
conf (/etc/apache2/apache2.conf in my distro):

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\"
\"%{User-Agent}i\"" vhost_combined
LogFormat "%{X-Forwarded-For}i %h %l %u %t \"%r\" %>s %O
\"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

Regards


2012/10/23 Türker Sezer <[email protected]>:
> 2012/10/23 IT_Contact <[email protected]>
>>
>> Hi,
>> My apache access logs on the servers that sit behind my HAproxy server all
>> show the IP of the HAproxy server as the source/client IP.  What am I
>> missing in my config?
>
>
> You have to add "option forwardfor" to your config. Then you can read user
> ip from "X-Forwarded-For" header.
>
> --
> Türker Sezer
> TS Design Informatics LTD.
>
> http://www.tsdesign.info/

Reply via email to