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

The defaults section can be configured with the YAML tree haproxy_defaults.

mode

String.

Example:

mode: http

log

Accepts a list of mappings of the following format:

  • address ;
  • facility: optional ;
  • level: optional ;
  • minlevel: optional ;
  • format: optional.

Example:

log:
- address: /dev/log
  facility: local0
- address: localhost:514
  level: warning
  facility: local7

retries

Numerical.

timeout

Accepts a list of mappings in the following format:

  • param ;
  • value.

Example:

timeout:
- param: connect
  value: 5000
- param: client
  value: 5000
- param: tunnel
  value: 50000

maxconn

Numerical.

stats

Accepts a mapping containing the following items:

  • enabled: boolean, optional ;
  • hide_version: boolean, optional ;
  • uri: optional ;
  • realm: optional ;
  • auth: optional ;
  • refresh: optional.

Example:

stats:
  enabled: true
  hide_version: true

options

Accept a list of values.

Example:

options:
- dontlognull
- forceclose

errorfile

Accepts a list of mappings in the following format:

  • code ;
  • file.

Example:

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

balance

String.

Example:

balance: roundrobin

cookie

String.

compression

Accepts a mapping containing the following items:

  • algo: optional ;
  • type: optional ;
  • offload: boolean, optional.

Example:

compression:
  algo: gzip
  type: 'test/html text/plain'

http_check

Accepts a mapping containing the following items:

  • disable_on_404: boolean, optional ;
  • expect: optional ;
  • send_state: boolean, optional.

Example:

http_check:
  disable_on_404: true
  expect: 'status 200'
  send_state: true
Clone this wiki locally