Re: [squid-users] how to use accel url_rewrite_program urlgroup and cache_peer?

From: Chris Robertson <crobertson@dont-contact.us>
Date: Mon, 01 Oct 2007 14:59:46 -0800

Sylvain Viart wrote:
> Hi,
>
> I'm setting up a special config which sould do the following:
>
> * load balance URL on backend servers (originserver)
> * filter URL on different kind of server with URL rewriting based on URL.
>
>
> So I have:
>
> incomming URL: somedomaine/path/script.php => should go to peer which
> host script, php
> incomming URL: somedomaine/imagepath/someimg.jpg => should go to
> static peer, filer
>
> So I've a redirector which analyze the URL based on some regexp. It
> was needed for 2.5. Because the redirector script was embedding the
> round robbing balancing algorithm.
>
> Now in 2.6 I've to rewrite all my config, and the reriter may become
> useless. But I'm a bit lost in the configuration because I've based my
> script on 2.5.
> Now with url_rewrite_program, http_port accel, cache_peer it seems I
> should be able to do it in full squid.conf directive.
>
> For now my squid works on the load balancing side, but not on
> filtering, as the filtered url are also balanced on the originserver.
>
> Here is my related squid.conf directives:
>
> # I do vhost namebased
> http_port 80 defaultsite=my.site.com vhost
>
> # the rewrite filter
> url_rewrite_program /etc/squid/redirector.pl
> url_rewrite_children 5
> url_rewrite_concurrency 0
> url_rewrite_host_header off
>
> cache_peer php-01 parent 80 0 no-query originserver round-robin
> weight=1 login=PASS
> cache_peer php-02 parent 80 0 no-query originserver round-robin
> weight=1 login=PASS
>
> /etc/squid/redirector.pl return, the incomming URL if not matched, or
> the url with the domain replaced with the filer's hostname if it
> matches a static document.
> ex: http://filer/imagepath/someimg.jpg
>
> I don't find any good doc on how to use all those rewriting url + peer
> balancing etc. Can someone point me to some good ref?

http://wiki.squid-cache.org/SquidFaq/ReverseProxy#head-7bd155a1a9919bda8ff10ca7d3831458866b72eb

>
> Regards,
> Sylvain.

Chris
Received on Mon Oct 01 2007 - 17:00:02 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Nov 01 2007 - 13:00:00 MDT