HAProxy Enterprise Documentation 2.2r1


Install the Update module as follows for your platform:

$ # On Debian/Ubuntu
$ sudo apt-get install hapee-2.2r1-lb-update
$ # On CentOS/RedHat/Oracle/Photon OS
$ sudo yum install hapee-2.2r1-lb-update
$ # On SUSE
$ sudo zypper install hapee-2.2r1-lb-update
$ # On FreeBSD
$ sudo pkg install hapee-2.2r1-lb-update


  1. In the global section of your configuration file, add a module-load directive to load the Update module:

       module-load hapee-lb-update.so
  2. Below the global section, add a new configuration section named dynamic-update. Inside, add one or more update lines that specify from where and how often to download new content. Here is an example that updates the contents of a file at /etc/hapee-2.2/redirects.map from the URL

       update id /etc/hapee-2.2/redirects.map map url delay 300s

    As an example, the contents of this file could be a list of IP subnets and URL paths to redirect clients to if their IP address falls within one of the ranges:     /maint/maintenance.html /maint/forbidden.html        /maint/deny.html

    In the following snippet, a frontend references this data using an acl directive and an http-request redirect directive:

    frontend fe_main
       mode http
       bind :80
       acl redirect_needed src,map_ip(/etc/hapee-2.2/redirects.map) -m found
       acl redirect_performed path_beg /maint/
       http-request redirect location %[src,map_ip(/etc/hapee-2.2/redirects.map)] if redirect_needed !redirect_performed

If you do not reference the file you specify in dynamic-update for use in another configuration section, the service will log an error similar to the following:

[ALERT]    (1525) : config : 'update': id '/redirects.map' not found in file ./haproxy.cfg at line 22
[ALERT]    (1525) : config : Fatal errors found in configuration.

Next up

TLS session ticket keys