Two squid and one balancer [ SOLUTION ]
-
Hi to all,
I want to share my configuration for two squid proxy and one balancer for proxy connection ( I used ZenLoadBalancer ).1. First of all I created a far with 2 squid and the redireection for port 3128 from balancer to squid farm.
2. ( problem ) squid now saw only the Balancer IP and not the Client IP so :
3. I modded the squid.conf with :logformat squid %ts.%03tu %6tr %{X-Forwarded-For}>h %>a %Ss/%03>Hs %<st %rm="" %ru="" %[un="" %sh="" %<a="" %mt[="" code]<br="">4\. then for real time statistic i modded the follow lines on /usr/local/www/squid_monitor_data.php [quote]44 show_tds(array("Date", "IP Client", "IP Balancer", "Status", "Address", "User", "Destination")); 57 $logline_dest = preg_split("/\//", $logline[10]); 67 echo "{$logline[3]}\n"; 68 echo "{$logline[4]}\n"; 69 echo "{$logline[5]}\n"; <----- LINE ADDED 70 echo "{$logline[8]}\n"; 71 echo "{$logline[9]}\n";[/quote] 5\. then I tweaked the lighthttp to generate the report correctly, in the directory /usr/local/www/lightsquid/ I modded lightparser.pl on the follow lines : [code]130 ($Ltimestamp,$Lelapsed,$Lhost,$LhostBAL,$Ltype,$Lsize,$Lmethod,$Lurl,$Luser,$Lhierarchy,$Lconttype,@Lrest)=split;[/code] Enjoy.</st>
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy