Hi Tim,
On Sun, Nov 9, 2014 at 5:12 AM, Tim Dunphy <[email protected]> wrote: > Hey all, > > I tried to add my wiki host to my VCL in the hopes of giving it a little > speed boost. > > However it seems that when I put the vcl into place and cycling varnish > that the 'wiki' back end is never selected. My main website gets pulled up > in the browser when I enter in the wiki URL. > > Can someone maybe take a look and let me know what I'm doing wrong in my > VCL logic? > > if ( req.url ~ "wiki.mydomain.com") { > > set req.backend = www; > There are two mistakes here it seems. Firstly req.url contains the URL part without the host. The host is in req.http.host. Furthermore I think you meant !~ here. So what you want is if (req.http.host ≈ "wiki.mydomain.com") { set req.backend = wiki; } Per. -- *Per Buer* CTO | Varnish Software AS Cell: +47 95839117 We Make Websites Fly! www.varnish-software.com [image: Register now] <http://info.varnish-software.com/varnish-summits-autumn-2014-registration>
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
