Re: [squid-users] reverse proxy, 2 backends and vhost

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Sat, 24 Jun 2006 00:46:07 +0200

lör 2006-06-24 klockan 00:04 +0200 skrev jb:
> Hello;
>
> This is my sitation :
>
> I have 2 box with Squid (2.5 on Debian) behind a load balancer. This box do
> reverse proxying of one backend server, with vhost enabled.
>
> *.mysite.com (100 000 subdomains, same IP) -> load balancer > squid box > 1
> backend server
>
>
> I must add a second backend server temporarily (the first is full...) ,
> with an address like this : storage.mysite.com and a second IP address.
>
> Which is the easiest way to do this with Squid ? A redirector is the only
> solution ? No solution with /etc/host (I think not, because of subdomains)?

/etc/hosts is fine.. my recommended method for telling Squid-2.5
accelerators the address of the real web server(s).

Squid.conf accel settings:

  httpd_accel_host your.main.site
  httpd_accel_uses_host_header on
  httpd_accel_port 80

Squid.conf access controls (inserted where instructed, with the defaults
kept)

  acl mysites dstdomain your.main.site other.accel.site etc..
  acl http protocol http
  acl port80 port 80
  http_access allow http port80 mysites

List the servers and their sites in /etc/hosts

In 2.6 the setup is simplified a bit, no longer needing /etc/hosts.

Regards
Henrik

Received on Fri Jun 23 2006 - 16:46:12 MDT

This archive was generated by hypermail pre-2.1.9 : Sat Jul 01 2006 - 12:00:02 MDT