Limited urls
Roberto O. Fernández Crisial
roberto.fernandezcrisial at gmail.com
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 domain1.com and domain2.com, but deny access to server's IP
address. This is my vcl_recv:
if (req.http.host ~ ".*domain1.*")
{
set req.backend = domain1;
}
elseif (req.http.host ~ ".*domain2.*")
{
set req.backend = domain2;
}
else
{
error 405 "Sorry!";
}
Am I doing the right way? Do you have any suggestion?
Thank you,
Roberto.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110316/8e3bd614/attachment-0003.html>
More information about the varnish-misc
mailing list