Re: [SQU] redirect_rewrites_host_header

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 23 Aug 2000 02:58:06 +0200

Toby Dickenson wrote:

> Yes, I only have one backend server. That server is using the Host
> header to generate absolute URLs that refer back to itself.
>
> This is a useful characteristic because everything still works if I
> access the server directly, or through a different squid. This means
> that the absolute URLs in the responses all to refer to the
> appropriate front end server that handled the request.
>
> I am aware of the problem of a request with a bad Host header
> polluting the cache. If squid is going to rewrite the Host header, my
> ideal would be for a configuration option to specify the *value* of
> that header.

You can, indirectly.

Rebuild squid with --disable-internal-dns.

Add a mapping from your web site to the backend server in /etc/hosts.

Use
httpd_accel_host your.accelerated.domain

Squid will then use your.accelerated.domain as the Host header
regardless of what the client sends, and use the IP specified in
/etc/hosts to fetch the content.

--
Henrik Nordstrom
Squid hacker
--
To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
Received on Tue Aug 22 2000 - 19:41:36 MDT

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