Re: Accelerator Vs. Virtual Domains

From: Duane Wessels <wessels>
Date: Tue, 15 Oct 96 22:32:54 -0700

lioux@GNS.com.br writes:

>To whom it may interest: :)
>
> Just picture a common setup in nowadays ISP daily work.
> I have set about 10 virtual domain WWW servers on my WWW machine using
the Apache Server.
> I would like to have all of them accessable through the Squid Accelerat
or.
> However, the http_accel entry syntax prevents that.
> I can only use squid as an accelerator for one machine.
> I would like to access all my WWW virtual domains through this squid ac
celerator.
> Am I been dumb? If so, I apologize.

If Squid and your virtual host WWW servers are on the same machine
you just need the -V option. (I guess this should go in the config
file since nobody seems to look at the command line options).

And if your Squid is on a different machine than your servers, you
should be able to do this with the URL redirector. Of course Squid
must run on the virtual-host machine. I have never personally tried
this however. Perhaps someone can confirm or deny whether this
works....

From Release-Notes-1.1.txt:

URL Redirector
==============================================================================
Squid now has the ability to rewrite requested URLs. This is implemented
as an external process, much like the dnsservers. Every incoming URL
is written to a 'redirector' process which then returns a new URL, or
a blank line to inidicate no change.

The redirector program is NOT provided in the Squid package. Currently,
it is up to the individual users to write their own implementation. For
testing, this very simple Perl script can be used:

    #!/usr/local/bin/perl
    $|=1;
    print while (<>);

The redirector program must read URLs (one per line) on standard input,
and write rewritten URLs or blank lines on standard output. Note that
the redirector program can not use buffered I/O. Additional information
is written after the URL which a redirector can use to make a decision.
The input line consists of four fields:

    URL ip-address/fqdn ident method

The ip-address is always written, the fqdn will be provided if
available (otherwise it will be "-"). Similarly, the user ident will
be provided if available (i.e. 'ident_lookup on' in config file). The
method is GET, POST, etc..

Note that when used in conjunction with the -V option (on a virtual hosted
machine) this provides a mechanism to use a single Squid cache as a front
end to numerous servers on different machines. URLs written to the
redirector will look like:

    http://192.0.0.1/foo
    http://192.0.0.2/foo

The redirector program might be this Perl script:

    #!/usr/local/bin/perl
    $|=1;
    while (<>) {
        s@http://192\.0\.0\.1@http://www1.foo.org@;
        s@http://192\.0\.0\.2@http://www2.foo.org@;
        print;
    }

Duane W.
Received on Tue Oct 15 1996 - 22:32:55 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:33:17 MST