Multiple backends on same server (cPanel)

Jerry Steele ticktockhouse at gmail.com
Mon Mar 24 15:37:34 CET 2014


Hello,

So, this now appears to work:

backend default {
  .host = "11.22.33.208";
  .port = "8081";
}

backend default2 {
  .host = "11.22.33.210";
  .port = "8081";
}

sub vcl_recv {

if (req.http.host ~ "domain3.com$";) {
      set req.backend = default2;
}


Is "default" some kind of builtin? The fact that the other
virtualhosts are working, to me, says that they're being sent to the
default backend, and only requests going to *.domain3.com are being
sent to the "default2" backend. varnishlog appears to confirm this.

One other issue - I changed this last night, and it appeared not to
work, however, I come back to it this morning, and everything is fine.
Does this mean that the old configuration (or objects that the new
config was looking for) had been cached, and their TTL had to expire?
If this is the case, where are these defaults set? Is it necessary to
manually clear the cache when changing configs like this? I believe
there's a curl command to do this...

Thanks

-- 
---

Jerry Steele
Telephone: +44 (0)7920 237105
http://ticktockhouse.co.uk



More information about the varnish-misc mailing list