Re: [squid-users] Redirect depending on http status code

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 10 Mar 2011 15:40:29 +1300

 On Wed, 9 Mar 2011 14:49:12 -0300, Leonardo M. Ramé wrote:
> Hi, I'm new to Squid and have a problem I think could be solved by
> the
> proxy.
>
> I have to Apache servers, Server "A" is on a local network, and
> Server
> "B" is in a remote place accessible by Internet. Both servers are
> running a CGI script that
> serves documents when called like "/mycgi?DocID=1234".
>
> Server "A" has only new documents, say maximum two weeks old, and
> Server
> "B" has all documents, new and old.
>
> I would like to know, if through Squid, I can do this:
>
> 1) The user asks for a document using
> http://<SERVER-A>/mycgi?DocID=1234
> 2) Squid redirects the request to the Apache server running on the
> local
> network.
> 3a) If the document is found, then Squid simply return it to the
> caller.
> 3b) If the document is not found, then Squid redirects the request to
> Server B (remote), and Apache in Server B returns the document to
> Squid,
> and it to the client caller.
>
> Can Squid solve this kind of problems? does anyone knows an Open
> Source
> solution?

 This is what proxies do. Core business as the phrase goes.

 http://wiki.squid-cache.org/ConfigExamples/Reverse/MultipleWebservers
 http://www.squid-cache.org/Doc/config/cache_peer

 Amos
Received on Thu Mar 10 2011 - 02:40:33 MST

This archive was generated by hypermail 2.2.0 : Thu Mar 10 2011 - 12:00:02 MST