HAProxy Enterprise Documentation 2.0r1


An HAProxy Enterprise configuration file, which is typically located at /etc/hapee-2.0/hapee-lb.cfg, is composed of named sections. The capabilities that each configuration section offers are different.

In the example below you can see a basic configuration file that contains the four essential sections of an HAProxy Enterprise configuration, global, defaults, frontend, and backend. Section names begin at the start of a line and all configuration directives of a section need to be indented.

 # process-level settings here

 # defaults here

frontend www
 # a frontend that accepts requests from clients

backend webservers
 # servers that fulfill the requests

You can enable extra functionality by using the various other sections, some of which require you to load a module before they become available.

HAProxy Enterprise Configuration sections

Besides the global section, you can use all other sections multiple times within your configuration. In general, the order of the sections does not matter. The defaults section is a special case where the order of appearance is important, since it applies default settings for any frontends and backends that follow it.

Below, we list all configuration sections and a short description of each.




The global section is unique, should be at the top of your configuration, and contains global configuration options.


Frontend sections define the IP addresses and ports that clients can connect to.


Backend sections define pools of servers that HAProxy Enterprise forwards traffic to.


The defaults section can be used to set default values for all following frontend, backend, and listen sections. You can have multiple defaults sections.


A listen section combines the functions of frontend and backend.


The aggregations section is part of HAProxy Enterprise's Stick Table Aggregator module functionality.


A cache section enables caching of responses from backend servers.


The dynamic-update section is part of HAProxy Enterprise's Update module functionality. It lets HAProxy Enterprise pull updated ACL and Map files from a remote server.


A fcgi-app section defines how HAProxy Enterprise should connect to a FastCGI application.


A mailers section lists message transfer agent (MTA) servers to which HAProxy Enterprise will forward error messages so that they can be distributed to email recipients. Emails are sent using the SMTP protocol.


A peers section to enable replication of stick table data between two or more HAProxy Enterprise nodes.


A program section enables the HAProxy Process Manager which allows you to start external programs when HAProxy Enterprise starts.


A resolvers section lists DNS nameservers that HAProxy Enterprise will query when it needs to resolve a hostname to an IP address.


A userlist section allows you to configure Basic authentication to restrict access to your proxied services.

Next up