Hi all,
Just to clarify or understand this haproxy (2.2) implementation.
I have just created an OPNsense cluster for my customer with haproxy plugin for load balancing Exchange 2016 servers.
Here is an partial output from /usr/local/etc/haproxy.conf file.
# Backend: bk_exchange_owa (Exchange Backend OWA)
backend bk_exchange_owa
# health check: hc_owa
option httpchk GET /owa/HealthCheck.htm
http-check expect status 200\ OK
As you can see, I have #health check: hc_owa commented but no trace in the haproxy.conf with acl or use_backend :
We should have this lines in haproxy.conf.
acl path_owa path_beg -i /owa/
and
use_backend bk_exchange_owa if path_owa
Is it a bug ?
Thank you for your help.
Quote from: netbja on January 17, 2018, 11:04:24 PM
As you can see, I have #health check: hc_owa commented but no trace in the haproxy.conf with acl or use_backend :
You're confusing health checks with ACLs. A health check does not involve an if-clause.
Quote from: netbja on January 17, 2018, 11:04:24 PM
We should have this lines in haproxy.conf.
acl path_owa path_beg -i /owa/
and
use_backend bk_exchange_owa if path_owa
You need to create a ACL for this. In our HAProxy plugin version 2.0 (and later) there is a two-step approach to creating a ACL:
# Go to "Rules & Checks" and create a "Condition"
# Go to "Rules & Checks" and create a "Rule" that utilizes the previously created "Condition"
Next you'll need to add this "Rule" to either your frontend ("Public Service") or backend ("Backend Pool").
Regards
- Frank
Hello Franck,
You are right but did you try what you are saying ?
Sure I made Conditions and Rules in "Rules & Checks" but the configuration file haproxy.conf does not contain any Conditions and any Rules.
So is it a bug ?
Thank you.
BJA.
Quote from: netbja on January 19, 2018, 02:21:49 PM
You are right but did you try what you are saying ?
Yes, I'm using multiple versions of the HAProxy plugin in production.
Quote from: netbja on January 19, 2018, 02:21:49 PM
Sure I made Conditions and Rules in "Rules & Checks" but the configuration file haproxy.conf does not contain any Conditions and any Rules.
So is it a bug ?
Please provide screenshots of your configuration, or even better, a backup of your config.xml (only the HAProxy tag).
Regards
- Frank
Hello again Frank,
In attach file, the config file config.xml
Thank you.
BJA.
Finaly I understand where I can put my ACL in FrontEnd, but it's a little bit more tricky than a txt file with native haproxy.
Cheers.