Re: [SQU] Host header munging?

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 26 Oct 2000 22:12:47 +0200

Mike Suter wrote:
>
> > Please remember that your redirector still munges the URL, and Squid
> > caches the object on the URL after the redirector.
>
> Right, but my assumption is that all that gets rewritten (with
> redirect_rewrites_host_header off) is the URL (ie, server to connect to),
> and not the host header - is that not correct?

That is the intention yes.

> > Well, it might be that redirect_rewrites_host_header is broken in your
> > Squid version. Which version is it?
>
> 2.3.STABLE3
>
> > My preferred setup for accelerators is to use split DNS (or /etc/hosts)
> > for resolving the real server names, and not rewrite the URL at all in
> > the acceleration process, except as required to suppor IP based hosts
> > for old clients not sending Host headers..
>
> that's the problem - there are legacy IP based servers on this same
> accelerator :(

The server end actually does not matter that much in my preferred setup
for the accelerator. What matters is what you want to support out to the
clients.

I use two things when configuring an accelerator:

a) A private DNS or /etc/hosts to allow the accelerator to look up the
backend server IP for the requested domains without having to rewrite
the host component.

b) A redirector to rewrite the external IP:s to preferred domain/host
names when old clients connect without sending a ip, or when new clients
connects by using the IP and not the domain name.

and redirect_rewrites_host_header is left on to have Squid forward
request with a Host header using a domain name instead of the IP on
request in class b above. Class a passes thru unmodified.

This way you can have any mix of backend web servers, and present them
outwards via the accelerator as any mix of IP or domain based servers as
required. For example you can have anu legacy web servers only
supporting IP, and presenting them all on a single IP using Host
headers.. or the other way around if you prefer...

By playing some tricks with the redirector you can also split the
forwarding based on the url_path if so is required (as is the case for
one of the companies I have worked for.. there all servers must be
available under the main address with different url paths, but might
also be accessed using individual host/domain names.).

--
Henrik Nordstrom
Squid hacker
--
To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
Received on Fri Oct 27 2000 - 08:57:07 MDT

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