It is worth while to have a lab for this sort of thing on your local
machine. It can all be on a single machine with say two apache virtual hosts
listening on different ports (8080 and 8081) and haproxy on the machine
itself as well.

That being said if I am not mistaken they are evaluated from top to bottom.
It is not the order of the ACLs but the order of when ACLs are evaluated. So
in this case the order of the use_backend statements. So you would want to
switch the order of your use_backend statements because the "/a" is also
true for "/a/b" match, whereas "/a/b" is not a match for "/a".

My disclaimer is that I haven't tested this either ;-)

-Kyle

On Tue, Dec 14, 2010 at 4:33 AM, Timh B <[email protected]> wrote:

>
> Hi all,
>
> Could anyone from the top of your head tell me if ACLs apply in a specific
> order? Say, I have an acl that matches url /a and uses a specific backend
> for all requests to /a. But if I want to use another acl and backend for
> /a/b urls - could I just put that acl-match above the /a match and be done
> with it?
>
> Unfortunely I can't "lab" with my current setup as it is in production
> already.
>
> Example;
>
>   acl url_AB   url_beg /a/b
>   acl url_A    url_beg /a
>
>   use_backend backend_A if url_A
>   use_backend backend_B if url_AB
>
> ...
>
> Best Regards,
> Timh
>
>
>

Reply via email to