Multiple backends on same server (cPanel)

Jerry Steele ticktockhouse at gmail.com
Mon Apr 7 16:26:57 CEST 2014


Hello,

As I stated, the above seems to work, but now, I have a requirement to be
able to point development.domain.com to the "default" backend.

I have tried this:

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 == "development.domain.com" ) {
        set.req.backend = default;
        }

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


but I get this error:

Message from VCC-compiler:
Expected an action, 'if', '{' or '}'
('input' Line 21 Pos 9)
        set.req.backend = default;
--------###############-----------


...can anyone suggest why this isn't working? Is it some appallingly bad
syntax on my part?

Thanks


-- 
---

Jerry Steele
Telephone: +44 (0)7920 237105
http://ticktockhouse.co.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20140407/d3cc6705/attachment.html>


More information about the varnish-misc mailing list