Add listen
Select server: |
Note: If you re-configure the master server, the slave server will 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') }}
IP for bind listener, if empty will be assigned on all IPs.
Start typing IP, or press down. If you are using VRRP, leave the IP field blank. If you assign an 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') }}
Enter name to pem file, or press down:
{{ input('path-cert-listen', name="cert", placeholder="some_cert.pem", size='39') }}
|
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'} %}
{{ select('listener_acl_then', name='acl_then', values=values, first='Choose action', class='force_close', disabled=false) }}
value
{{ input('frontend_acl_then_value', name='acl_then_value', title="Required if \'then\' is \'Use backend\' or \'Redirect\'") }}
|
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 SSL Offloading', desc='SSL Offloading') }}
|
WAF(?): |
{{ checkbox('slow_atack', title='Slow attack protect', desc='Slow attack') }}
{{ checkbox('ddos', title='DDOS attack protect', desc='DDOS') }}
{{ checkbox('blacklist_checkbox', title='Use blacklist', desc='Blacklist') }}
{{ checkbox('waf', title='Web application firewall', desc='WAF', value='1') }}
{{ checkbox('antibot', title='Antibot Protection', desc='Antibot', value='1') }}
Enter the name of the blacklist, or press down:
{{ input('blacklist-hide-input', size='39', name="blacklist", placeholder="blacklist.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: |
Default params: inter 2000 rise 2 fall 5
{% 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') }}
|
Advanced: |
Show Advanced settings |
Add Listen
|
Generate config
|