<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body >No. That is not the case.<div><br></div><div>Thanks,</div><div><br></div><div>Lei</div><br><br><br>-------- Original message --------<br>From: "Crowder, Travis" <Travis.Crowder@penton.com> <br>Date: 08/15/2013 3:35 PM (GMT-08:00) <br>To: Lei Wang <leiwang@rhapsody.com> <br>Cc: James Pearson <james@ifixit.com>,varnish-misc <varnish-misc@varnish-cache.org> <br>Subject: Re: varnish forward to wrong backend <br> <br><br>It is probably that the other domains have the same URL. Check for www.mydns1.com<http://www.mydns1.com> in your first conditional.<br><br>-Travis Crowder<br><br>Sent from my iPhone<br><br>On Aug 15, 2013, at 5:20 PM, "Lei Wang" <leiwang@rhapsody.com<mailto:leiwang@rhapsody.com>> wrote:<br><br>Hi James,<br><br>It is very simple like below:<br>sub vcl_recv {<br> if (req.url ~ "^/my-home") {<br> set req.http.host = "www.mydns1.com<http://www.mydns1.com>";<br> set req.backend = backend1 ;<br> } elsif (req.http.host ~ "^www.mydns2.com<http://www.mydns2.com>") {<br> set req.http.host = "www.mydns2.com<http://www.mydns2.com>";<br> set req.backend = backend2<br> } elsif (req.http.host ~ "^www.mydns3.com<http://www.mydns3.com>") {<br> unset req.http.Accept;<br> set req.backend = backend3;<br> } elsif (req.http.host ~ "^www.mydns4.com<http://www.mydns4.com>") {<br> unset req.http.Accept;<br> set req.backend = backend4;<br> } else {<br> error 404 "Unknown virtual host";<br> }<br>}<br><br><br>Thanks,<br><br>Lei<br><br><br>On Thu, Aug 15, 2013 at 2:12 PM, James Pearson <james@ifixit.com<mailto:james@ifixit.com>> wrote:<br>Excerpts from Lei Wang's message of 2013-08-15 11:09:13 -0700:<br>> I have varnish 3 (varnish-3.0.4 revision 9f83e8f) installed to cache<br>> multi-site in one configuration. Sometimes Varnish switched to use the<br>> first backend in the configuration for all the requests to the other sites.<br>> As in the sample configuration below, the request to backend2, backend3,<br>> backend4 sometimes forwarded to backend1. Does anyone have the same problem<br>> or know any solution, suggestion?<br>><br>> The varnish backend configuration is quite simple like below:<br>><br>> [snip]<br><br>What does the rest of your config look like, specifical</body>