Re: [squid-users] Poor mans static CDN

From: <beachie_at_tiscali.co.uk>
Date: Tue, 26 Jan 2010 15:33:26 +0100 (GMT+01:00)

>----Original Message----
>From: crobertson_at_gci.net
>Date: 26/01/2010 0:24
>To: <squid-users_at_squid-cache.org>
>Subj: Re: [squid-users] Poor mans static CDN

<snip>

>A simple redirect program that strips a leading "cache." from the
>requested domain name will give you the flexibility to do this.

Thanks for responding Chris.

So now I have the following config:

http_port external-iip2:80 vhost defaultsite=blog.tld
cache_peer blog.tld parent 80 0 no-query originserver login=PASS
url_rewrite_program /etc/squid/r.pl

r.pl does a simple substitution s/cache.blog.tld/blog.tld/i and
appears to be working

clientRedirectDone: 'http://cache.blog.tld/?9834733' result=http:
//blog.tld/?9834733 << [check]

But the debug shows the request being build with the cache hostname.

httpBuildRequestHeader: Host: cache.blog.tld
httpBuildRequestHeader: User-Agent: ...
...
Packet capture:
GET /?9834733 HTTP/1.0
Host: cache.blog.tld

Any more ideas?

B.
Received on Tue Jan 26 2010 - 14:34:06 MST

This archive was generated by hypermail 2.2.0 : Wed Jan 27 2010 - 12:00:05 MST