Add listen
Select a server:
------
{% for select in selects %}
{{ select.1 }}
{% endfor %}
Note: If you re-configure the master server, the slave server will be re-configured automatically
A "listen" section defines a complete proxy with its frontend and backend parts combined in one section. It is generally useful for TCP-only traffic.
All proxy names must be formed from upper and lower case letters, digits, '-' (dash), '_' (underscore) , '.' (dot) and ':' (colon). ACL names are
case-sensitive, which means that "www" and "WWW" are two different proxies.
Historically, all proxy names could overlap, it just caused troubles in the logs. Since the introduction of content switching, it is mandatory that two
proxies with overlapping capabilities (frontend/backend) have different names. However, it is still permitted that a frontend and a backend share the same
name, as this configuration seems to be commonly encountered.
Name:
{{ input('name', name='listener', title="Name Listener", placeholder="web_80", required='required') }}
IP and Port:
{{ input('ip', placeholder="Any", size='15') }}:
{{ input('listen-port', name='port', type="number", title="Port for bind listen", placeholder="8080", size='5', required='required') }}
If the IP-address for the listener is empty, it will listen on all IP addresses.
Start typing IP or press down button. If you are using VRRP, leave the IP field blank . If you assign a VRRP IP, the slave server will not start
Mode:
{% set values = dict() %}
{% set values = {'http':'http','tcp':'tcp'} %}
{{ select('listen-mode-select', name='mode', values=values, selected='http', required='required', class='force_close') }}
SSL Offloading
Enter name of pem file, or press the "down" button:
{{ input('path-cert-listen', name="cert", placeholder="some_cert.pem", size='39') }}
Disable SSL check
Disable SSL verify on servers
Maxconn:
{{ input('maxconn', value='2000', type="number", title="Fix the maximum number of concurrent connections on a frontend", size='5', required='required') }}
This value should not exceed the global maxconn. Default global maxconn value: 2000
Balance:
{{ select('balance', values=balance_params, selected='roundrobin', required='required', class='force_close') }}
Health check:
{{ select('listener_checks', name='health_check', values=checks, selected='', class='force_close') }}
URI path for checking: {{ input('listener_checks_http_path', name='checks_http_path', value='/', title="URI for checking e.g. /check") }}
Domain name: {{ input('listener_checks_http_domain', name='checks_http_domain', placeholder='domain.com', title="Domain name for checking e.g. domain.com") }}
ACL:
if
{{ select('listener_acl_if', name='acl_if', values=if_values, first='Choose if', class='force_close', disabled=false) }}
value
{{ input('listener_acl_value', name="acl_value") }}
then
{% set values = dict() %}
{% set values = {'2':'Redirect to','3':'Allow','4':'Deny', '6': 'Return', '7': 'Set-header'} %}
{{ select('listener_acl_then', name='acl_then', values=values, first='Choose action', class='force_close', disabled=false) }}
value
{{ input('listener_acl_then_value', name='acl_then_value', title="Required if \'then\' is \'Use backend\' or \'Redirect\', \'Return\', or \'Set-header\'") }}
Web acceleration(?):
{{ checkbox('compression', title='Enable Compression', value='1', desc='Compression') }}
{{ checkbox('cache', title='Enable cache', value='2', desc='Cache') }}
{{ checkbox('ssl_offloading', title='Enable redirect from HTTP to HTTPS', desc='HTTP->HTTPS') }}
WAF(?):
{{ checkbox('slow_atack', title='Slow attack protect', desc='Slow attack') }}
{{ checkbox('ddos', title='DDOS attack protect', desc='DDOS') }}
{{ checkbox('whitelist_checkbox', title='Add whitelist', desc='Whitelist') }}
{{ checkbox('blacklist_checkbox', title='Add blacklist', desc='Blacklist') }}
{{ checkbox('waf', title='Web application firewall', desc='WAF', value='1') }}
{{ checkbox('antibot', title='Antibot Protection', desc='Antibot', value='1') }}
Enter a blacklist name, or press the "down" button:
{{ input('blacklist-hide-input', size='39', name="blacklist", placeholder="blacklist.lst") }}
Enter a whitelist name, or press the "down" button::
{{ input('whitelist-hide-input', size='39', name="whitelist", placeholder="whitelist.lst") }}
Options:
{{ checkbox('forward_for', title='Option Forward for if none', desc='Forward for') }}
{{ checkbox('redispatch', title='Enable Redispatch', desc='Redispatch') }}
{% set values = dict() %}
{% set values = {'Off':'Off','Server only':'Server only','Force close':'Force close','Pretend keep alive':'Pretend keep alive'} %}
{{ select('force_close', values=values, first='Force HTTP close', class='force_close') }}
{{ checkbox('cookie', title='Set cookie', desc='Set cookie', value='1') }}
{{ checkbox('options-listen-show', title='Set options manually', desc='Set options') }}
{% set values = dict() %}
{% set values = {'None':'None','rewrite':'rewrite','indirect':'indirect','insert':'insert'} %}
{{ select('rewrite', values=values, first='rewrite/indirect/insert', class='force_close') }}
{{ checkbox('prefix', title='This keyword indicates that instead of relying on a dedicated cookie for the persistence, an existing one will be completed', desc='prefix', value='prefix') }}
{{ checkbox('nocache', title='This option is recommended in conjunction with the insert mode when there is a cache between the client and HAProxy', desc='nocache', value='nocache') }}
{{ checkbox('postonly', title='This option ensures that cookie insertion will only be performed on responses to POST requests', desc='postonly', value='postonly') }}
{{ checkbox('dynamic', title='Activate dynamic cookies. When used, a session cookie is dynamically created for each server', desc='dynamic', value='dynamic') }}
dynamic-cookie-key: {{ input('dynamic-cookie-key', placeholder="your-custom-key") }}
Servers:
{% include 'include/add_servers.html' %}
{{ checkbox('template-listen', name='template', title='Use server-template instead servers list', value='template', desc='Server-template') }}
Check:
Custom check params
Default params: inter 2000 rise 2 fall 5
Check
{% set values = dict() %}
{% set values = {'1000':'1000','2000':'2000','3000':'3000'} %}
{{ select('inter-listen', values=values, first='inter', class='force_close') }}
{% set values = dict() %}
{% set values = {'1':'1','2':'2','3':'3'} %}
{{ select('rise-listen', name='rise', values=values, first='rise', class='force_close') }}
{% set values = dict() %}
{% set values = {'4':'4','5':'5','6':'6'} %}
{{ select('fall-listen', name='fall', values=values, first='fall', class='force_close') }}
{{ checkbox('circuit_breaking_listen', name="circuit_breaking", desc='Circuit Breaking', title='Enable Circuit Breaking', value='1') }}
Observe:
{{ select('circuit_breaking_observe', values=observe, class='force_close') }}
error-limit: {{ input('circuit_breaking_error_limit', type='number', value='50', style='width: 50px;') }}
on-error:
{{ select('circuit_breaking_on_error', values=on_error, class='force_close') }}
Show Advanced settings
Hide Advanced settings
Add Listen
Generate config