Thanks Henrik, but I have more than 100 000 subdomains on 'mysite.com', and new sudomains are added each minute. I can't list all domains and I don't want to edit /etc/host every time a change occured. It seems to me that wildcard (*.mysite.com) doesn't work in /etc/host . I only want that one subdmain (storage.mysite.com) goes to another backend . 2006/6/24, Henrik Nordstrom <henrik@xxxxxxxxxxxxxxxxxxx>:
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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQBEnG8vB5pTNio2V7IRAqMSAKDMSikWEyZ350IclHFrkZojWiCtBgCeNigz +7EapGUtVOGSMeIThPsayaY= =rMVX -----END PGP SIGNATURE-----