Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 900 Bytes

upstream.md

File metadata and controls

41 lines (32 loc) · 900 Bytes

Upstream management

nginx_upstreams: List of dict. An upstream has few keys. See bellow.

Upstream params

  • name: upstream name. Can be use in site with proxy_pass http://upstream_name
  • params: list of param (hash, zone...)
  • servers: each upstream MUST have at least 1 server
  • state: Optional. Can be 'absent' or 'present'

Server params

You must set a path. For example: 192.168.0.50:8080 or unix:/tmp/my.sock.

All this params are optional. You should see Nginx upstream doc.

  • weight
  • max_fails
  • fail_timeout
  • backup
  • down
  • route
  • slow_start

Example

nginx_upstreams:
  - name: 'proxy_apache'
    servers:
      - path: '127.0.0.1:80'
        max_conns: 150
        weight: 10
        down: false
    state: 'present'