I created this 'odd' varnish configuration for educational purposes --
backend default {
.host = "neuro.debian.net";
.port = "http";
}
sub vcl_recv {
set req.backend = default;
set req.http.host = "neuro.debian.net";
return(lookup);
}
sub vcl_miss {
set bereq.http.host = "example.com";
}
sub vcl_hit {
error 200 "returned from cache";
}
sub vcl_fetch {
set beresp.status = 500;
return (hit_for_pass);
}
Ideally it must only fetch from the backend and it must return Apache's
'It works!' every time since neuro.debian.net is configured to respond
properly only if the hostname is set to neuro.debian.net, otherwise 'It
works!'.
There must never be a cache hit.
But the expected happens only once on the first request. But then
afterward, the real website of neuro.debian.net in a crippled way, and
sometimes there is just a blank page.
Thanks for any help!
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc