Varnish3 is ignoring the req.backend directive.
As explained on the documentation (here), I've set two backends, and the regex for redirecting the request to the correct one. By the way, seems liks Varnish is just ignoring the directive, obviously I'm missing something :-)
I want to catch awesomedomain.it as well as awesomedomain.it/whatever, while all the others domain just should point to default backend.
Any help is appreciated.
backend local {
.host = "127.0.0.1";
.port = "8000";
}
backend default {
.host = "10.8.0.2";
.port = "80";
}
sub vcl_recv {
if (req.http.host ~ "/awesomedomain\.it/") {
set req.backend = local;
}
}