Re: [squid-users] Multiple http servers behind a single squid

From: Tom Le <tomle@dont-contact.us>
Date: Fri, 15 Oct 2004 11:29:30 -0700

yeah,

I maybe wrong, but I don't think so.

Jim Nachlin wrote:

> Thanks for your help. That is clear.
>
> So the nameservers for webservername1.com (1.2.3.4) and
> webservername2.com (1.2.3.5) would point to the external interface of
> the machine that squid is on? These two webservers would then take
> local addresses like 192.168.1.4 and 192.168.1.5?
>
> Any caveats with this system?
>
> Regards,
> JIM
>
>
> Tom Le wrote:
>
>> hi
>>
>> you need a squid-redirector. I use the following and it does the job
>> fine for me, but whether it caches anything, I have not looked yet.
>>
>> ----snip-----
>> #!/usr/bin/perl
>> $|=1; #Flush any buffer asap.
>> #Read Standard input, one request at a time from squid.
>> while (<>) {
>>
>> @X = split;
>> $url = $X[0];
>> $move_302 = 0;
>>
>> s@http://<your external.webservername1.com>/@http://<your
>> internal.webserver-X.com>/@;
>>
>> s@http://<your external.webservername2.com>/@http://<your
>> internal.webserverY.com>/@;
>>
>> # you can add as many as you want
>>
>> print;
>>
>> }
>> ----snap-----
>>
>> And then; you need to the following in your squid.conf
>>
>> --- squid.conf-----
>> # TAG: redirect_program
>> # Specify the location of the executable for the URL redirector.
>> # Since they can perform almost any function there isn't one
>> included.
>> # See the FAQ (section 15) for information on how to write one.
>> # By default, a redirector is not used.
>> #
>> #Default:
>> # none
>> redirect_program /etc/squid/squid-redirector.pl
>> redirect_children 10
>> ------------------------------------------------------
>>
>> Hope this help. Sometimes things do not look too obvious.
>>
>>
>>
>>
>> Jim Nachlin wrote:
>>
>>> Hi,
>>>
>>> Sorry for so basic a question, but I'm trying to set up squid as an
>>> httpd accelerator for several httpds running on different IP
>>> addresses. It should be possible, using some combination of
>>>
>>> httpd_accel_host virtual
>>> httpd_accel_single_host off
>>>
>>> etc. I can't find any documentation on how to actually do this, or
>>> on how the packets will be redirected. If my servers are now
>>> 1.2.3.4 and 1.2.3.5, will the machine hosting squid now have those
>>> addresses, or if not, how will the requests from clients go to squid.
>>>
>>> Obviously, I'm confused. Feel free to RTFM me, but just let me know
>>> what M to RTF. Thanks in advance for your help.
>>>
>>> Jim
>>>
>>
>

-- 
----------------------------
Tom Le
Phone : (604) 612-6617
Email : tomle@telus.net
----------------------------
******************************************************************
This electronic communication (email) is intended only for the use
of the addressee and may contain  information which is  privileged
and confidential.  If you are not  the intended recipient, you are
hereby notified that any dissemination, distribution or copying of
this email is strictly prohibited. If you have received this email
in error, please  reply to the  sender immediately  and delete the
original and all copies. Thank you.
****************************************************************** 
Received on Fri Oct 15 2004 - 12:25:26 MDT

This archive was generated by hypermail pre-2.1.9 : Mon Nov 01 2004 - 12:00:02 MST