2015-09-14 13:38:58 +00:00
|
|
|
################################################################
|
|
|
|
# Global configuration
|
|
|
|
################################################################
|
|
|
|
|
|
|
|
# Reverse proxy port
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
# Default: ":80"
|
|
|
|
#
|
|
|
|
# port = ":80"
|
|
|
|
|
|
|
|
# Timeout in seconds.
|
|
|
|
# Duration to give active requests a chance to finish during hot-reloads
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
# Default: 10
|
|
|
|
#
|
|
|
|
# graceTimeOut = 10
|
|
|
|
|
|
|
|
# Traefik logs file
|
2015-09-24 12:32:37 +00:00
|
|
|
# If not defined, logs to stdout
|
2015-09-14 13:38:58 +00:00
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# traefikLogsFile = "log/traefik.log"
|
|
|
|
|
|
|
|
# Access logs file
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# accessLogsFile = "log/access.log"
|
|
|
|
|
|
|
|
# Log level
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
# Default: "ERROR"
|
|
|
|
#
|
|
|
|
# logLevel = "ERROR"
|
|
|
|
|
2015-11-21 01:59:49 +00:00
|
|
|
# SSL certificates and keys
|
|
|
|
# You may add several certificate/key pairs to terminate HTTPS for multiple domain names using TLS SNI
|
2015-09-14 13:38:58 +00:00
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
2015-11-21 01:59:49 +00:00
|
|
|
# [[certificates]]
|
2015-09-14 13:38:58 +00:00
|
|
|
# CertFile = "traefik.crt"
|
|
|
|
# KeyFile = "traefik.key"
|
|
|
|
|
2015-10-08 15:56:45 +00:00
|
|
|
# Backends throttle duration: minimum duration between 2 events from providers
|
|
|
|
# before applying a new configuration. It avoids unnecessary reloads if multiples events
|
|
|
|
# are sent in a short amount of time.
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
# Default: "2s"
|
|
|
|
#
|
2015-10-17 12:14:20 +00:00
|
|
|
# ProvidersThrottleDuration = "5s"
|
2015-10-08 15:56:45 +00:00
|
|
|
|
|
|
|
|
2015-09-14 13:38:58 +00:00
|
|
|
################################################################
|
|
|
|
# Web configuration backend
|
|
|
|
################################################################
|
|
|
|
|
|
|
|
# Enable web configuration backend
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# [web]
|
|
|
|
|
|
|
|
# Web administration port
|
|
|
|
#
|
|
|
|
# Required
|
|
|
|
#
|
|
|
|
# address = ":8080"
|
|
|
|
|
2015-09-22 19:00:29 +00:00
|
|
|
# SSL certificate and key used
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# CertFile = "traefik.crt"
|
|
|
|
# KeyFile = "traefik.key"
|
|
|
|
|
2015-09-14 13:38:58 +00:00
|
|
|
|
|
|
|
################################################################
|
|
|
|
# File configuration backend
|
|
|
|
################################################################
|
|
|
|
|
|
|
|
# Enable file configuration backend
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# [file]
|
|
|
|
|
|
|
|
# Rules file
|
|
|
|
# If defined, traefik will load rules from this file,
|
|
|
|
# otherwise, it will load rules from current file (cf Sample rules below).
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# filename = "rules.toml"
|
|
|
|
|
|
|
|
# Enable watch file changes
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# watch = true
|
|
|
|
|
|
|
|
|
|
|
|
################################################################
|
|
|
|
# Docker configuration backend
|
|
|
|
################################################################
|
|
|
|
|
|
|
|
# Enable Docker configuration backend
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# [docker]
|
|
|
|
|
|
|
|
# Docker server endpoint. Can be a tcp or a unix socket endpoint.
|
|
|
|
#
|
|
|
|
# Required
|
|
|
|
#
|
|
|
|
# endpoint = "unix:///var/run/docker.sock"
|
|
|
|
|
|
|
|
# Default domain used.
|
|
|
|
# Can be overridden by setting the "traefik.domain" label on a container.
|
|
|
|
#
|
|
|
|
# Required
|
|
|
|
#
|
|
|
|
# domain = "docker.localhost"
|
|
|
|
|
2015-09-14 22:03:53 +00:00
|
|
|
# Enable watch docker changes
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# watch = true
|
|
|
|
|
2015-09-14 13:38:58 +00:00
|
|
|
# Override default configuration template. For advanced users :)
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# filename = "docker.tmpl"
|
|
|
|
|
2015-11-20 15:05:06 +00:00
|
|
|
# Enable docker TLS connection
|
|
|
|
#
|
|
|
|
# [docker.tls]
|
|
|
|
# ca = "/etc/ssl/ca.crt"
|
|
|
|
# cert = "/etc/ssl/docker.crt"
|
|
|
|
# key = "/etc/ssl/docker.key"
|
|
|
|
# insecureskipverify = true
|
|
|
|
|
2015-09-14 13:38:58 +00:00
|
|
|
|
|
|
|
################################################################
|
|
|
|
# Mesos/Marathon configuration backend
|
|
|
|
################################################################
|
|
|
|
|
|
|
|
# Enable Marathon configuration backend
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# [marathon]
|
|
|
|
|
|
|
|
# Marathon server endpoint.
|
|
|
|
# You can also specify multiple endpoint for Marathon:
|
|
|
|
# endpoint := "http://10.241.1.71:8080,10.241.1.72:8080,10.241.1.73:8080"
|
|
|
|
#
|
|
|
|
# Required
|
|
|
|
#
|
|
|
|
# endpoint = "http://127.0.0.1:8080"
|
|
|
|
|
2015-10-03 14:51:14 +00:00
|
|
|
# Network interface used to call Marathon web services. Needed in case of multiple network interfaces.
|
2015-09-14 13:38:58 +00:00
|
|
|
# Optional
|
|
|
|
# Default: "eth0"
|
|
|
|
#
|
|
|
|
# networkInterface = "eth0"
|
|
|
|
|
|
|
|
# Enable watch Marathon changes
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# watch = true
|
|
|
|
|
|
|
|
# Default domain used.
|
|
|
|
# Can be overridden by setting the "traefik.domain" label on an application.
|
|
|
|
#
|
|
|
|
# Required
|
|
|
|
#
|
|
|
|
# domain = "marathon.localhost"
|
|
|
|
|
|
|
|
# Override default configuration template. For advanced users :)
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# filename = "marathon.tmpl"
|
|
|
|
|
|
|
|
|
2015-09-21 16:05:56 +00:00
|
|
|
################################################################
|
|
|
|
# Consul KV configuration backend
|
|
|
|
################################################################
|
|
|
|
|
|
|
|
# Enable Consul KV configuration backend
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# [consul]
|
|
|
|
|
|
|
|
# Consul server endpoint
|
|
|
|
#
|
|
|
|
# Required
|
|
|
|
#
|
2015-09-25 09:44:19 +00:00
|
|
|
# endpoint = "127.0.0.1:8500"
|
2015-09-21 16:05:56 +00:00
|
|
|
|
|
|
|
# Enable watch Consul changes
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# watch = true
|
|
|
|
|
|
|
|
# Prefix used for KV store.
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
2015-10-01 10:04:25 +00:00
|
|
|
# prefix = "/traefik"
|
2015-09-21 16:05:56 +00:00
|
|
|
|
|
|
|
# Override default configuration template. For advanced users :)
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# filename = "consul.tmpl"
|
|
|
|
|
|
|
|
|
2015-10-03 14:51:14 +00:00
|
|
|
################################################################
|
|
|
|
# Etcd configuration backend
|
|
|
|
################################################################
|
|
|
|
|
|
|
|
# Enable Etcd configuration backend
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# [etcd]
|
|
|
|
|
|
|
|
# Etcd server endpoint
|
|
|
|
#
|
|
|
|
# Required
|
|
|
|
#
|
|
|
|
# endpoint = "127.0.0.1:4001"
|
|
|
|
|
|
|
|
# Enable watch Etcd changes
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# watch = true
|
|
|
|
|
|
|
|
# Prefix used for KV store.
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# prefix = "/traefik"
|
|
|
|
|
|
|
|
# Override default configuration template. For advanced users :)
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# filename = "etcd.tmpl"
|
|
|
|
|
|
|
|
|
|
|
|
################################################################
|
|
|
|
# Zookeeper configuration backend
|
|
|
|
################################################################
|
|
|
|
|
|
|
|
# Enable Zookeeperconfiguration backend
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# [zookeeper]
|
|
|
|
|
|
|
|
# Zookeeper server endpoint
|
|
|
|
#
|
|
|
|
# Required
|
|
|
|
#
|
|
|
|
# endpoint = "127.0.0.1:2181"
|
|
|
|
|
|
|
|
# Enable watch Zookeeper changes
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# watch = true
|
|
|
|
|
|
|
|
# Prefix used for KV store.
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# prefix = "/traefik"
|
|
|
|
|
|
|
|
# Override default configuration template. For advanced users :)
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# filename = "zookeeper.tmpl"
|
|
|
|
|
|
|
|
|
|
|
|
################################################################
|
|
|
|
# BoltDB configuration backend
|
|
|
|
################################################################
|
|
|
|
|
|
|
|
# Enable BoltDB configuration backend
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# [boltdb]
|
|
|
|
|
|
|
|
# BoltDB file
|
|
|
|
#
|
|
|
|
# Required
|
|
|
|
#
|
|
|
|
# endpoint = "/my.db"
|
|
|
|
|
|
|
|
# Enable watch BoltDB changes
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# watch = true
|
|
|
|
|
|
|
|
# Prefix used for KV store.
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# prefix = "/traefik"
|
|
|
|
|
|
|
|
# Override default configuration template. For advanced users :)
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# filename = "boltdb.tmpl"
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-14 13:38:58 +00:00
|
|
|
|
|
|
|
################################################################
|
|
|
|
# Sample rules
|
|
|
|
################################################################
|
|
|
|
# [backends]
|
|
|
|
# [backends.backend1]
|
2015-09-25 09:44:19 +00:00
|
|
|
# [backends.backend1.circuitbreaker]
|
|
|
|
# expression = "NetworkErrorRatio() > 0.5"
|
2015-09-14 13:38:58 +00:00
|
|
|
# [backends.backend1.servers.server1]
|
|
|
|
# url = "http://172.17.0.2:80"
|
|
|
|
# weight = 10
|
|
|
|
# [backends.backend1.servers.server2]
|
|
|
|
# url = "http://172.17.0.3:80"
|
|
|
|
# weight = 1
|
|
|
|
# [backends.backend2]
|
2015-09-25 09:44:19 +00:00
|
|
|
# [backends.backend2.LoadBalancer]
|
|
|
|
# method = "drr"
|
2015-09-14 13:38:58 +00:00
|
|
|
# [backends.backend2.servers.server1]
|
|
|
|
# url = "http://172.17.0.4:80"
|
|
|
|
# weight = 1
|
|
|
|
# [backends.backend2.servers.server2]
|
|
|
|
# url = "http://172.17.0.5:80"
|
|
|
|
# weight = 2
|
|
|
|
#
|
2015-09-15 14:09:21 +00:00
|
|
|
# [frontends]
|
|
|
|
# [frontends.frontend1]
|
2015-09-14 13:38:58 +00:00
|
|
|
# backend = "backend2"
|
2015-09-15 14:09:21 +00:00
|
|
|
# [frontends.frontend1.routes.test_1]
|
2015-09-15 16:35:32 +00:00
|
|
|
# rule = "Host"
|
2015-09-14 13:38:58 +00:00
|
|
|
# value = "test.localhost"
|
2015-09-15 14:09:21 +00:00
|
|
|
# [frontends.frontend2]
|
2015-09-14 13:38:58 +00:00
|
|
|
# backend = "backend1"
|
2015-10-30 10:33:41 +00:00
|
|
|
# passHostHeader = true
|
2015-09-15 14:09:21 +00:00
|
|
|
# [frontends.frontend2.routes.test_2]
|
2015-09-15 16:35:32 +00:00
|
|
|
# rule = "Path"
|
2015-09-14 13:38:58 +00:00
|
|
|
# value = "/test"
|