I'm having trouble with the syntax of the hdr* matching for creating
ACL's.

I know that my control flow is correct.  by changing the acl
defiinition to a simple src ip, i get the desired change of backends.

ie. this will send traffic to img backends (desired)
      #  acl from_vnsh hdr_sub -i nginx
        acl from_vnsh src 208.94.1.44
        use_backend varnish if METH_GET ! from_vnsh
        default_backend img

this will send it to varnish:
        acl from_vnsh hdr_sub -i nginx
        # acl from_vnsh src 208.94.1.44
        use_backend varnish if METH_GET ! from_vnsh
        default_backend img

I think the problem is you shouldn't have the METH_GET in there
use_backend varnish if ! from_vnsh
works for me
oh, i thought there was an implicit AND when two expressions were put
together...which i know is true for the src based acl.  i only want
GETs to go to this backend.

Doh! My bad, then you do want that I wasn't sure you could use that directly in the use_backend or if you had to create an acl based on that "predefine"

Reply via email to