redirect in varnish

Anders Nordby anders at
Wed Aug 6 16:18:24 CEST 2008


On Mon, Apr 28, 2008 at 09:47:16PM +0000, Poul-Henning Kamp wrote:
> 	if ( == "") {
> 		set = "";
> 	}

Trying a VCL like this (this is my entire VCL, used as an example), I do
not get a redirect:

backend default {
        .host = "";
        .port = "80";

sub vcl_recv {
        set = "";
        set req.http.url = "/";

Instead of doing a redirect, it fetches pages off the default backend.
Why? How do I redirect to another URL on a different host, not served by

PS: Another thing, the first backend seems to become the default one,
even though there is no backend called "default". Shouldn't it respond
with 503 Service Unavailable instead? I like to control what is default
and not.



More information about the varnish-misc mailing list