Skip to content
Tristan Le Guern edited this page Apr 24, 2019 · 1 revision

backends

The backend section can be configured with the YAML tree haproxy_backends.

Example:

haproxy_backends:
- name: be-static
  servers:
  - name: concorde
    ip: 127.0.0.1
    port: 8080
    params:
    - check

name

String.

disabled

Boolean, optional.

description

String, optional.

servers

Optional.

Accepts a list of mappings in the following format:

  • name ;
  • ip ;
  • port: optional ;
  • maxconn: optional ;
  • _params: list, optional.

Example:

servers:
- name: concorde
  ip: 127.0.0.1
  params:
  - check

balance

String, optional.

cookie

String, optional.

mode

String, optional.

Example:

mode: http

log

String, optional.

retries

Numerical, optional.

Optional.

Accepts a mapping in the following format:

  • name ;
  • condition.

Example:

acl:
- name: acl-is-root
  condition: path -i /

acl:
- { name: acl-is-root, condition: path -i / }
- { name: acl-is-static, condition: path_beg /static }

redirects

List, optional.

http_check

List, optional.

http_request

Optional.

Accepts a list of mappings in the following format:

  • action ;
  • param: optional ;
  • condition: optional.

Example:

http_request:
- { action: auth, condition: unless acl-auth }

http_response

Optional.

Accepts a list of mappings in the following format:

  • action ;
  • param: optional ;
  • condition: optional.

options

List, optional.

compression

List, optional.

timeout

Optional.

Accepts a mapping in the following format:

  • param ;
  • value.

Example:

timout:
- param: connect
  value: 5000

reqadd

List, optional.

rspadd

List, optional.

reqrep

List, optional.

reqirep

List, optional.

rsprep

List, optional.

respirep

List, optional.

appsession

String, optional.

errorfile

Optional.

Accepts a mapping in the following format:

  • code ;
  • file.

Example:

errorfile:
- {code: 400, file: /etc/haproxy/errors/400.http }

force_persist

String, optional.