Search squid archive

Re: Squid load balancing access log

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 15/05/2012 3:29 p.m., Ibrahim Lubis wrote:
Squid guru,

I do load balancing 2 centos server with ucarp and haproxy, with cache peering all squid server as sibling. I use squid as caching. The problem is every log line what i see in access log file is ip from squid cache not from user requested web access. Before i do load balancing,only one squid box, in access log file i see ip user requested web access.

Thx

Your understanding of the logged information is incorrect. What your server is logging is the *client* it received the request from. client and user are two different things. Squid is the servers client.

Previously you had some configuration setup to pass Squids client IP through to the web server and log that instead of teh Web servers client (Squid IP). Squid with the "forwarded_for on" directive updates the X-Forwarded-For header with its clients IP. The web server needs to process that header in order to retrieve the furthest downstream IP it can trust.

NP: the client "IP" produced by this may be one IP or a whole list of addresses, possibly the word "unknown", and increasingly likely these days to be a different IPv4/6 version to teh web server. Be sure your server can handle any of those cases.

Amos



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux