Limited urls

Roberto O. Fernández Crisial roberto.fernandezcrisial at
Wed Mar 16 17:48:47 CET 2011

Hi guys,

I am trying to restrict some access to my Varnish. I want to accept only
requests for and, but deny access to server's IP
address. This is my vcl_recv:

if ( ~ ".*domain1.*")

set req.backend = domain1;

elseif ( ~ ".*domain2.*")

set req.backend = domain2;


error 405 "Sorry!";


Am I doing the right way? Do you have any suggestion?

Thank you,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-misc mailing list