you need a line like this on your webserver configuration (this one is for
apache2)
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
you can find a more detailed explanation here on section 2: "Preparing The Backend Web Servers"
http://www.howtoforge.com/high-availability-load-balancer-haproxy-heartbeat-debian-etch
El Monday 25 February 2008 21:23:18 rkmr.em#gmail.com escribió:
> hi
> i have forward for enabled like this:
>
> option forwardfor except 127.0.0.1/8
>
> but in my webserver logs the IP address is the ip address of where
> haproxy is running and not the original client ip address. this is
> true with what I see in my fastcgi backends too.
> how to fix this?
> thanks
>
>
>
>
>
>
>
>
>
>
>
> listen WWW :80
> stats uri /stats
> stats auth X:Y
> stats realm Global\ statistics
>
> mode http
> option abortonclose
> option forwardfor except 127.0.0.1/8
> option httpclose
> clitimeout 60000
> srvtimeout 60000
> contimeout 4000
> retries 3
> redispatch
> balance roundrobin
-- Pablo Escobar Lopez Head of Infrastructure & IT Support Bioinformatics Department Centro de Investigación Príncipe Felipe (CIPF) Tfn: (34) 96 328 96 80 ext: 1004 http://bioinfo.cipf.esReceived on 2008/02/26 19:02
This archive was generated by hypermail 2.2.0 : 2008/02/26 19:15 CET