HAProxy Enterprise Documentation 1.9r1

Installation

Install the Update module as follows for your platform:

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

Configuration

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

    global
       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-1.9/redirects.map from the URL http://10.0.0.1:80/redirects.map:

    dynamic-update
       update id /etc/hapee-1.9/redirects.map map url http://10.0.0.1:80/redirects.map 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:

    10.0.0.0/8     /maint/maintenance.html
    192.168.0.0/16 /maint/forbiden.html
    0.0.0.0        /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-1.9/redirects.map) -m found
       http-request redirect location src,map_ip(/etc/hapee-1.9/redirects.map) if redirect_needed

Next up

TLS session ticket keys