Navigation

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

    HAProxy - AND condition ACL

    Cache/Proxy
    4
    4
    4972
    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.
    • A
      ak last edited by

      Trying to migrate to HAProxy from Apache.

      Two websites A.website.com and B.website.com. I have both on SSL and working via HAProxy. Under B.website.com I have more URL's I want to proxy to such as B.website.com/webserver1 and B.website.com/webserver2 etc.

      I cannot see how I can get a AND condition on an ACL to have

      • If host ends in 'A.website.com'
      • AND path starts with 'webserver1'

      The GUI says the conditions are OR conditions by default now. Is it possible to write AND conditions on the Admin GUI to proxy to different backends?

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

        You can write multiple acl names in the 'condition' field of the action.

        1 Reply Last reply Reply Quote 1
        • junicast
          junicast last edited by

          I'm sorry but the answer given does not suffice for me. What is the correct way to use logical operators in pfsense haproxy? If I just give multiple is OR or AND used? What if I want to write a condition that has OR and AND?

          1 Reply Last reply Reply Quote 0
          • C
            chamont last edited by

            In the "Actions" table, look for the "Condition acl names" column. You can enter one or more ACL names for any action, separated by spaces. If you enter more than one ACL name for an action, ALL ACLs must match for the action to occur (ANDed conditions).

            1 Reply Last reply Reply Quote 4
            • First post
              Last post