ACLs (or ACL-like behaviour) for req.url regex expressions

Matt Hanley matt.hanley at
Thu Mar 3 18:25:43 CET 2016

Hi all,

Hopefully a quick question from a new Varnish user – I haven’t been able to find anything in the docs for this.

I’m separating static content and application servers and would like to do this based on several regex expressions on req.url in vcl_recv.

Is it possible to use an ACL for this?

acl static_assets {

if (req.url ~ static_assets) {
  set req.backend_hint = static;
set req.backend_hint = default;

If this isn’t possible, is there an alternative that’s more elegant than lots of `if` statements?

Many thanks in advance
Matt Hanley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-misc mailing list