Haproxy nbsrv acl not working

access-control-listhaproxy

The following acl doesn't work for me:

acl no_waf nbsrv(to_waf) lt 1
use_backend back-www if no_waf
default_backend to_waf

I keep getting error 503 (No server is available to handle this request.) instead of being sent to the backend back-www.

Any ideas?

**EDIT, backend to_waf looks like this:

backend to_waf

    option  forwardfor header X-Forwarded-For

    option  httpchk HEAD / HTTP/1.0

    http-check expect status 404

    timeout server 25s

    server  10.30.10.2:9000    10.30.10.2:9000    check

Best Answer

Found it: I was reloading haproxy and there was a error in the config file, for some reason reloading it didn't trigger any error message. When I tried to restart the service I got the error, after fixing it the condition started to work.