Dnia 2010-03-06, sob o godzinie 11:52 +0100, Cyril Bonté pisze:

> Hi Thierry,
> 
> Le Samedi 6 Mars 2010 11:02:40, thierry stephan a écrit :
> > Hello,
> > 
> > Little stupid question, I just install Haproxy on my FreebSD 8 and it is 
> > working well with Apache 22 ...
> > But now, all of my http logs are coming from my local server, not 
> > anymore from external public IP :)
> > My server is listening on 8080 and Haproxy on port 80 ...
> > 
> > How to resolve this problem ??
> 
> For that, I use mod_rpaf on the apache backends (assuming option forwardfor 
> is enabled in the haproxy configuration) : http://stderr.net/apache/rpaf/
> You can also have a look on the current apache development branch, with the 
> module mod_remoteip : http://httpd.apache.org/docs/trunk/mod/mod_remoteip.html
> 

Or
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
combined
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" x_combined
first is "standard" (for comparision), 2nd one is "log X-Forwarded-For
instead of remote IP"
u have to ofc set
option forwardfor
in haproxy
Using google really dont hurt, try it sometimes ;p
-- 
Mariusz Gronczewski (XANi) <[email protected]>
GnuPG: 0xEA8ACE64
http://devrandom.pl

Attachment: signature.asc
Description: To jest część wiadomości podpisana cyfrowo

Reply via email to