If you don't do any virtual hosting, you can modify vcl_hash to not hash based 
on the host parameter and just hash on the url:

############################
sub vcl_hash {
   hash_data(req.url);
   return (hash);
}
############################

Otherwise, you'd need to normalize the host head I think.

~Paul


On Thu, Nov 03, 2011 at 11:39:10AM +0800, Kelvin Loke wrote:
> Hi,
>
> I am wondering if this can be done:
>
> Visitor can access to our website using many different domains:
>
> Eg.
> www.123.com
> www.abc.com
> www.567.com
> www.xyz.com
>
> All these domains point to the same website same contents.
>
> To better utilize the cache, can I keep one cache of
> http://xxx.xxx.xxx/photo.png, instead of 4 cache for 4 different
> domains?
>
> Thanks!
>
> Regards,
> Kelvin Loke
>
> _______________________________________________
> varnish-misc mailing list
> [email protected]
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

________________________________

This message may contain confidential or privileged information. If you are not 
the intended recipient, please advise us immediately and delete this message. 
See http://www.datapipe.com/about-us-legal-email-disclaimer.htm for further 
information on confidentiality and the risks of non-secure electronic 
communication. If you cannot access these links, please notify us by reply 
message and we will send the contents to you.

_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to