Overview
To receive traffic in your load balancer, you must bind a listener to an IP address and port. This is done using the bind
directives in a frontend
or listen
section.
Use the keyword bind
followed by an IP address and port. You may have more than one bind
line in the same section, as shown in the example below where we receive traffic on both ports 80 and 443:
frontend ft_main
# All IP addresses on port 80
bind *:80 name web
# All IP addresses on port 443 (SSL)
bind *:443 ssl crt /etc/hapee-2.5/certs/site.pem name sslweb
There are a number of additional, optional parameters available on the bind
line. The order of the optional parameters is not important. Some, like ssl
, consist of a single word, while others like crt
expect a value. The name
parameter sets an optional name for the listener, which is displayed on the HAProxy Enterprise statistics page.
Next up
Syntax