TxHeader host and RxHeader host

rad_kam at tlen.pl rad_kam at tlen.pl
Mon Jul 30 00:30:25 CEST 2007


you wrote:

vcl_recv {
    if (req.http.host ~ "^(www\.)?example.com$") {
        req.backend = example_backend;
        req.http.host = "backend.example.com";
    } else {
        error 404 "Unknown virtual host";
    }
}


i have : 

backend other { 
        set backend.host = "mywebsite";
        set backend.port = "80";
}

if (req.http.host ~ "^my.server.with.varnish")
        {
                set req.backend = other;
        } else {
                error 404 "The host listed in your request is     
                 not recognized";
        }

Is this the same? I'm asking because your configuration won't work ( I have varnish 1.0.2)



More information about the varnish-misc mailing list