Reference

show acl

List all ACLs defined in the configuration.

Description Jump to heading

Use show acl to list all ACLs defined in the configuration.

As of version 2.4r1, In addition to the ID and file name, the show acl command shows the following acl file version information:

  • curr_ver indicates the currently active version number of the acl file.
  • next_ver indicates the version number of the temporary version (in-progress transaction) of the acl file.
  • entry_cnt indicates the number of entries in the temporary transaction version of the acl file.

Examples Jump to heading

In this example, we start with the following ACL expression in the configuration, which checks whether the requested URL path begins with /images/:

haproxy
frontend www
bind :80
acl static_url path -i -m beg /static/ /images/
haproxy
frontend www
bind :80
acl static_url path -i -m beg /static/ /images/
  1. Display a list of defined ACLs by calling show acl:

    nix
    echo "show acl" | \
    sudo socat stdio tcp4-connect:127.0.0.1:9999
    nix
    echo "show acl" | \
    sudo socat stdio tcp4-connect:127.0.0.1:9999
    output
    text
    # id (file) description
    0 () acl 'path' file '/etc/hapee-3.0/hapee-lb.cfg' line 51. curr_ver=0 next_ver=0 entry_cnt=2
    output
    text
    # id (file) description
    0 () acl 'path' file '/etc/hapee-3.0/hapee-lb.cfg' line 51. curr_ver=0 next_ver=0 entry_cnt=2
  2. Display ACL details by calling show acl. You can refer to the acl file using either the path or the ID. Here we use the ID.

    nix
    echo "show acl #0" | \
    sudo socat stdio tcp4-connect:127.0.0.1:9999
    nix
    echo "show acl #0" | \
    sudo socat stdio tcp4-connect:127.0.0.1:9999
    output
    text
    0x563d5dcc3fb0 /static/
    0x563d5dcc40a0 /images/
    output
    text
    0x563d5dcc3fb0 /static/
    0x563d5dcc40a0 /images/

See also Jump to heading

Do you have any suggestions on how we can improve the content of this page?