linux - Varnish - virtualhosts & multiple backends on one server -
i seem having confusing issues varnish. i've got simple setup (as haven't been using long, haven't got more complex).
backend default { .host = "11.22.33.208"; .port = "8081"; } backend default2 { .host = "11.22.33.210"; .port = "8081"; } ## multiple virtual hosts sub vcl_recv { if (req.http.host ~ "^domain1.com(:[0-9]+)?$") { set req.backend = default; } elsif (req.http.host ~ "^domain2.co.uk(:[0-9]+)?$") { set req.backend = default; } elsif (req.http.host ~ "^domain3.com(:[0-9]+)?$") { set req.backend = default2; }
now, seems work domain1.com, domain2.co.uk (plus subdomains - i'm not sure why should be, regexes have ^ anchor tag ?). problem is, doesn't seem work domain3.com, pointing different backend. well, work, in ends @ server's default page (it's cpanel machine), rather timing out. fear not, i'm more command line panel user :)
i've checked virtualhosts correct, , indeed sites visible @ domain3.com:8081
i had problem domain3.com working, , www.domain3.com going default page, why i've been making changes.
obviously, ips , domain names have been changed protect innocent..
does have ideas?
Comments
Post a Comment