multiple domains -> varnish -> one backend
Jon Drukman
jsd at cluttered.com
Thu May 1 23:58:31 CEST 2008
Poul-Henning Kamp wrote:
>> 1.1.2
>
> Please update to 1.2 or even better: -trunk, this has been fixed
> in the meantime.
I am running trunk now and the behavior is the same.
here is my complete vcl.conf (actual domain name changed. let me know
if you need to see it and i will send the file privately)
backend default {
.host = "originserver.com";
.port = "80";
}
sub vcl_recv {
set req.url = regsub(req.url, "^", "/site");
set req.http.X-Orig-Host = req.http.host;
set req.http.host = "originserver.com";
if (req.request == "POST") {
pipe;
}
# force lookup even when cookies are present
if (req.request == "GET" && req.http.cookie) {
lookup;
}
}
sub vcl_fetch {
# force minimum ttl of 180 seconds
if (obj.ttl < 180s) {
set obj.ttl = 180s;
}
}
More information about the varnish-misc
mailing list