Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    HAProxy ACL conditions

    Scheduled Pinned Locked Moved pfSense Packages
    2 Posts 2 Posters 4.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dps
      last edited by

      Hi,

      i am in need of ACL conditions in HAProxy. The package doesn't seem tu support ACL conditions, only single ACLs.
      The scenario is to expose websites that respect the host address and path begins.
      This is because we have multiple websites like this:

      http:/dev.site.com/publicAPI/
      http:/qa.site.com/publicAPI/
      http:/tst.site.com/publicAPI/

      We don't want to expose the root websites thats why we need an ACL condition.

      Please help me on how we do this in PFSense HAProxy.

      1 Reply Last reply Reply Quote 0
      • P
        PiBa
        last edited by

        Hi,

        If your using haproxy-devel package, and you give the acl's the same name they will be combined into 1 condition. I think that will accomplish what you want.?

        Result would be this for the acl name "MyAclCombined1", (didn't check if below config works..) :
        acl        0_MyAclCombined1  hdr(host) -i vhost1.pfsense.local
        acl        1_MyAclCombined1  path_beg -i /test/
        use_backend      test_http if 0_MyAclCombined1 1_MyAclCombined1

        If you want more advanced combinations of acl's however i think you will need to write them in one of the passthrough sections as 'text'.

        Greets
        PiBa-NL

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.