Search squid archive

Re: Multiple hostnames passed onto backend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On tor, 2008-07-10 at 09:34 -0700, orcadk wrote:

> Now, I can get Squid to do this for a single domain with just a couple of
> settings:
> http_port 80 accel defaultsite=customerx.mysite.com
> cache_peer [internal_ip] 80 0 no-query originserver=customerx_server
> 
> However, I need to get this working for all the customer sites. The customer
> sites themselves may be put on different servers. Basically I need to make a
> map saying customerx.squid.mysite.com -> customerx.mysite.com, but for an
> arbitrary amount of hostnames.
> 
> Any suggestions on how to do this?

You need a cache_peer per server, and cache_peer_access/domain selecting
what gets sent to each server.

Alternatively you can use the allow-direct option on http_port, a small
url rewriter to map the server names back to the customer servers and
carefully configured http_access rules to not allow any other traffic..
(no cache_peer lines in this config mode)

### CUT HERE ###
#!/usr/bin/perl -p
BEGIN { $|=1; }
s%\.squid\.mysite\.com%mysite.com%i;
### END CUT ###

this script maps anything.squid.mysite.com to anything.mysite.com

Regards
Henrik

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux