Using Varnish to redirect to other web server's subfolders

backend default {
    .host = "172.16.1.5";
    .port = "80"
}sub vcl_recv {
    set req.backend_hint = default;
}
backend checkthis {
    .host = "172.16.1.6";
    .port = "80";
}
sub vcl_recv {
    if (req.url ~ "^checkthis" ||
        req.url ~ "^checkthis/") {
        set.req.backend_hint = checkthis;
    }
    else {
        set req.backend_hint = default;
    }
}
Tags:
Submitted by kporras07 on