Cfg HAproxy to implement a "caches health detection + routing decision" rule

  • First of all, I hope this is the right forum's section, and please accept my apologies if the question got already discussed in the past (I searched a bit older post, but I was unable to find nothing similar).

    We are trying to implement the configuration shown in the following blog post:

    but we cannot find the right section in the web GUI where to configure the routing decision logic, that will be something like the following:

    030 # main frontend dedicated to end users
    031 frontend ft_web
    032 bind
    033 acl static_content path_end .jpg .gif .png .css .js .htm .html
    034 acl pseudo_static path_end .php ! path_beg /dynamic/
    035 acl image_php path_beg /images.php
    036 acl varnish_available nbsrv(bk_varnish_uri) ge 1
    037 # caches health detection + routing decision
    038 use_backend bk_varnish_uri if varnish_available static_content
    039 use_backend bk_varnish_uri if varnish_available pseudo_static
    040 use_backend bk_varnish_url_param if varnish_available image_php
    041 # dynamic content or all caches are unavailable
    042 default_backend bk_appsrv

    We already tried to manually edit the configuration file, but if we restart the Service in order to allow it to reload the configuration, it just erase the whole content and write a new cfg file with an empty configuration.

    Could you please share any suggestion in order to troubleshoot this issue or, better, to get it working?

    Any help would be very, very appreciated.

    Thank you in advance,


    EDIT: I forgot to mention which version we are using:

    • pfSense: 2.0.1-RELEASE (amd64)  built on Mon Dec 12 18:16:13 EST 2011  FreeBSD 8.1-RELEASE-p6
    • HAproxy: haproxy-full 1.4.21 pkg v 1.0

  • Hello,

    no suggestions about how to configure rules pointed out above?



Log in to reply