{% extends "base.html" %} {% block content %} {% from 'include/input_macros.html' import input, checkbox, select %} {% set balance_params = dict() %} {% set balance_params = {'roundrobin':'roundrobin','source':'source','leastconn':'leastconn','first':'first', 'rdp-cookie':'rdp-cookie', 'uri':'uri', 'uri whole':'uri whole', 'static-rr': 'static-rr', 'url_param userid':'url_param userid'} %} {% set checks = dict() %} {% set checks = {'':'Choose custom health check','option tcp-check':'Check a TCP Port', 'option ssl-hello-chk':'Check a SSL Port','option httpchk':'Check a HTTP service', 'option ldap-check':'Check a LDAP service', 'option mysql-check':'Check a MySql Service', 'option pgsql-check':'Check a PgSQL Service', 'option redis-check': 'Check a Redis Service', 'option smtpchk':'Check a SMTP service'} %} {% set if_values = dict() %} {% set if_values = {'1':'Host name starts with','2':'Host name ends with','3':'Path starts with','4':'Path ends with'} %}
{% include 'include/add_proxy.html' %}

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') }}
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') }}
ACL:
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') }}
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') }}
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
Advanced: Show Advanced settings
Add Listen Generate config

Add frontend

Select server:
Note: If you re-configure the master server, the slave server will re-configured automatically
A "frontend" section describes a set of listening sockets accepting client connections.

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:
IP and Port: :
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('frontend-mode-select', name='mode', values=values, selected='http', required='required', class='force_close') }}
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
ACL:
Web acceleration(?): {{ checkbox('compression2', name="compression", title='Enable Compression', value='1', desc='Compression') }} {{ checkbox('cache2', name="cache", title='Enable cache', value='2', desc='Cache') }} {{ checkbox('ssl_offloading1', title='Enable SSL Offloading', desc='SSL Offloading') }}
WAF(?): {{ checkbox('slow_atack1', title='Slow attack protect', desc='Slow attack') }} {{ checkbox('ddos1', title='DDOS attack protect', desc='DDOS') }} {{ checkbox('blacklist_checkbox1', title='Use blacklist', desc='Blacklist') }} {{ checkbox('waf2', name='waf', title='Web application firewall', desc='WAF', value='1') }} {{ checkbox('antibot1', title='Antibot Protection', desc='Antibot', value='1') }}
Options: {{ checkbox('forward_for1', title='Option Forward for if none', desc='Forward for') }} {% 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('options-frontend-show', title='Set options manually', desc='Set options') }}
Default backend
Start typing backend, or press down
{{ input('backends', name='backends', placeholder="some_backend", size='30') }}

Note: If you want to use a default backend, you must create a new backend first.

Advanced: Show Advanced settings
Add Frontend Generate config

Add backend

Select server:
Note: If you re-configure the master server, the slave server will reconfigured automatically
A "backend" section describes a set of servers to which the proxy will connect to forward incoming connections.

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('new_backend', title="Name backend", placeholder="web_80", required='required') }}
Mode: {% set values = dict() %} {% set values = {'http':'http','tcp':'tcp'} %} {{ select('backend-mode-select', name='mode', values=values, selected='http', required='required', class='force_close') }}
Balance: {{ select('balance', values=balance_params, selected='roundrobin', required='required', class='force_close') }}
Health check: {{ select('backend_checks', name='health_check', values=checks, selected='', class='force_close') }}
Web acceleration(?): {{ checkbox('compression3', name="compression", title='Enable Compression', value='1', desc='Compression') }} {{ checkbox('cache3', name="cache", title='Enable cache', value='2', desc='Cache') }} {{ checkbox('ssl_offloading2', title='Enable SSL Offloading', desc='SSL Offloading') }}
Options: {{ checkbox('forward_for2', title='Option Forward for if none', desc='Forward for') }} {{ checkbox('redispatch2', 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('cookie2', title='Set cookie', desc='Set cookie', value='1') }} {{ checkbox('options-backend-show', title='Set options manually', desc='Set options') }}
Servers: {% include 'include/add_servers.html' %}

{{ checkbox('template-backend', name='template', title='Use server-template instead servers list', value='template', desc='Server-template') }}
Check:
Default params: inter 2000 rise 2 fall 5
Advanced: Show Advanced settings
Add Backend Generate config

SSL

View certificates Existing certificates
Upload SSL certificates Certificate name Paste certificate content here(?)
{{ input('ssl_name') }}

Let's Encrypt

Server Domain name E-mail
{{ input('lets_domain', placeholder="example.com") }} {{ input('lets_email') }}
{% for option in options %} {% if option.2 == group or group == '1' %} {% endif %} {% endfor %}
Id Options
{{ option.0 }}

+ Add

In this section you can create, edit and delete options with given parameters. And after use them as autocomplete in the "Add" sections

How to use pre saved option you can see in this video
{% for s in saved_servers %} {% if s.3 == group or group == '1' %} {% endif %} {% endfor %}
Server Description

+ Add

In this section you can create, edit and delete servers. And after use them as autocomplete in the "Add" sections

How to use pre saved servers you can see in this video

Add Userlist

Select server:
Note: If you reconfigure Master server, Slave will reconfigured automatically
It is possible to control access to frontend/backend/listen sections or to http stats by allowing only authenticated and authorized users. To do this, it is required to create at least one userlist and to define users.
Userlist name: {{ input('new_userlist', required='required', title="Userlist name", placeholder="basic-auth-list") }}
Groups: {{ input('userlist-group', title="User`s group", placeholder="group_name") }}
It is also possible to attach users to this group by using a comma separated list of names preceded by "users" keyword.
User: {{ input('userlist-user', required='required', title="User name", placeholder="user_name") }} {{ input('userlist-password', required='required', title="User password. By default it insecure-password", placeholder="password") }} {{ input('userlist-user-group', title="User`s group", placeholder="user`s group") }}
It is also possible to attach groups to this user by using a comma separated list of groups.
Add Userlist Generate config
In this section you can create userlists. And after use them in the "Add" sections

How to use userlists you can read here
{{ input('group', value=group, type='hidden') }}
New blacklist Server for uploading Existing blacklists
Name: {{ input('new_blacklist_name') }} {% for list in black_lists %} {{ list }} {% endfor %}
New whitelist Server for uploading Existing whitelists
Name: {{ input('new_whitelist_name') }} {% for list in white_lists %} {{ list }} {% endfor %}
In this section you can create and edit black and white lists. And after use them in the HAProxy configs or in the "Add proxy" pages
{% include 'include/del_confirm.html' %}
{% endblock %}