Re: One answer about Squid

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sun, 25 Oct 1998 14:23:47 +0100

akorud@polynet.lviv.ua wrote:

> I documentation I read that I need to run redirector, but
> problem is that redirector NEVER get www.wups.lviv.ua or
> www1.wups.lviv.ua. It ALWAYS get 194.44.198.3
>
> What am I doing wrong?

You have to add
httpd_accel_uses_host_header on
to squid.conf.

Be warned that running a accelerated web server on a port other than 80
is far from perfect. The reason to this is that Squid will not rewrite
redirects sent by that server. Redirects are by example seen when a
directory (directory listin or default index file) URL misses the
trailing /. What you will se on such requests is that the client will be
redirected to http://www1.wups.lviv.ua:81/...

Two possible workarounds exists:

a) Tell Squid to listen both on port 80 and 81

http_port 80 81

b) Run your two servers on different backend IP addresses.

How to set up multiple IP addresses:
Linux:
The downlevel command that accomplishes this is ifconfig
ifconfig eth0:0 inet 192.168.0.2 up
Most distributions have a administrator interface to set things like
this up at boot time. See the manual to your distribution.
Then configure your webservers to bind to the different IP addresses. In
apache this is done by using the configuration directive BindAddress.

Windows NT:
Multiple IP addresses is set up using the "Advanced" properties of
TCP/IP networking properties.
Web server IP address is usually configured close to where you configure
the port number.

---
Henrik Nordström
Spare time Squid hacker
Received on Sun Oct 25 1998 - 08:04:12 MST

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