Limited urls

Sharl.Jimh.Tsin amoiz.shine at gmail.com
Thu Mar 17 03:34:55 CET 2011


yes,it is right.

Best regards,
Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED**)



2011/3/17 Roberto O. Fernández Crisial <roberto.fernandezcrisial at gmail.com>:
> 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.
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>




More information about the varnish-misc mailing list