2015-09-14 13:38:58 +00:00
################################################################
# Global configuration
################################################################
# Timeout in seconds.
# Duration to give active requests a chance to finish during hot-reloads
#
# Optional
# Default: 10
#
# graceTimeOut = 10
2016-10-27 14:17:02 +00:00
# Enable debug mode
#
# Optional
# Default: false
#
# debug = true
# Periodically check if a new version has been released
#
# Optional
# Default: true
#
# checkNewVersion = false
2015-09-14 13:38:58 +00:00
# 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"
2016-10-21 14:02:18 +00:00
# Backends throttle duration: minimum duration in seconds between 2 events from providers
2015-10-08 15:56:45 +00:00
# before applying a new configuration. It avoids unnecessary reloads if multiples events
# are sent in a short amount of time.
#
# Optional
2016-10-21 14:02:18 +00:00
# Default: "2"
2015-10-08 15:56:45 +00:00
#
2016-10-21 14:02:18 +00:00
# ProvidersThrottleDuration = "5"
2015-10-08 15:56:45 +00:00
2016-02-09 21:29:01 +00:00
# If non-zero, controls the maximum idle (keep-alive) to keep per-host. If zero, DefaultMaxIdleConnsPerHost is used.
# If you encounter 'too many open files' errors, you can either change this value, or change `ulimit` value.
#
# Optional
# Default: http.DefaultMaxIdleConnsPerHost
#
# MaxIdleConnsPerHost = 200
2016-07-31 16:08:33 +00:00
# If set to true invalid SSL certificates are accepted for backends.
# Note: This disables detection of man-in-the-middle attacks so should only be used on secure backend networks.
# Optional
# Default: false
#
# InsecureSkipVerify = true
2016-02-25 17:30:13 +00:00
# Entrypoints to be used by frontends that do not specify any entrypoint.
# Each frontend can specify its own entrypoints.
#
# Optional
# Default: ["http"]
#
# defaultEntryPoints = ["http", "https"]
2016-09-20 14:56:29 +00:00
# Constraints definition
#
# Optional
#
# Simple matching constraint
# constraints = ["tag==api"]
#
# Simple mismatching constraint
# constraints = ["tag!=api"]
#
# Globbing
# constraints = ["tag==us-*"]
#
# Backend-specific constraint
# [consulCatalog]
# endpoint = 127.0.0.1:8500
# constraints = ["tag==api"]
#
# Multiple constraints
# - "tag==" must match with at least one tag
# - "tag!=" must match with none of tags
# constraints = ["tag!=us-*", "tag!=asia-*"]
# [consulCatalog]
# endpoint = 127.0.0.1:8500
# constraints = ["tag==api", "tag!=v*-beta"]
2016-03-15 15:50:14 +00:00
# Enable ACME (Let's Encrypt): automatic SSL
#
# Optional
#
# [acme]
# Email address used for registration
#
# Required
#
# email = "test@traefik.io"
2016-09-29 11:49:12 +00:00
# File or key used for certificates storage.
# WARNING, if you use Traefik in Docker, you have 2 options:
# - create a file on your host and mount it as a volume
# storageFile = "acme.json"
# $ docker run -v "/my/host/acme.json:acme.json" traefik
# - mount the folder containing the file as a volume
# storageFile = "/etc/traefik/acme/acme.json"
# $ docker run -v "/my/host/acme:/etc/traefik/acme" traefik
2016-03-15 15:50:14 +00:00
#
# Required
#
2016-09-29 11:49:12 +00:00
# storage = "acme.json" # or "traefik/acme/account" if using KV store
2016-03-15 15:50:14 +00:00
# Entrypoint to proxy acme challenge to.
2016-07-12 05:25:01 +00:00
# WARNING, must point to an entrypoint on port 443
2016-03-15 15:50:14 +00:00
#
# Required
#
2016-03-21 10:10:18 +00:00
# entryPoint = "https"
2016-03-15 15:50:14 +00:00
# Enable on demand certificate. This will request a certificate from Let's Encrypt during the first TLS handshake for a hostname that does not yet have a certificate.
# WARNING, TLS handshakes will be slow when requesting a hostname certificate for the first time, this can leads to DoS attacks.
2016-09-13 13:17:34 +00:00
# WARNING, Take note that Let's Encrypt have rate limiting: https://letsencrypt.org/docs/rate-limits
2016-03-15 15:50:14 +00:00
#
# Optional
#
# onDemand = true
2016-08-05 18:42:45 +00:00
# Enable certificate generation on frontends Host rules. This will request a certificate from Let's Encrypt for each frontend with a Host rule.
# For example, a rule Host:test1.traefik.io,test2.traefik.io will request a certificate with main domain test1.traefik.io and SAN test2.traefik.io.
#
# Optional
#
# OnHostRule = true
2016-03-15 15:50:14 +00:00
# CA server to use
# Uncomment the line to run on the staging let's encrypt server
# Leave comment to go to prod
#
# Optional
#
# caServer = "https://acme-staging.api.letsencrypt.org/directory"
# Domains list
# You can provide SANs (alternative domains) to each main domain
2016-09-13 13:17:34 +00:00
# All domains must have A/AAAA records pointing to Traefik
# WARNING, Take note that Let's Encrypt have rate limiting: https://letsencrypt.org/docs/rate-limits
# Each domain & SANs will lead to a certificate request.
2016-03-15 15:50:14 +00:00
#
# [[acme.domains]]
# main = "local1.com"
# sans = ["test1.local1.com", "test2.local1.com"]
# [[acme.domains]]
# main = "local2.com"
# sans = ["test1.local2.com", "test2x.local2.com"]
# [[acme.domains]]
# main = "local3.com"
# [[acme.domains]]
# main = "local4.com"
2016-02-25 17:30:13 +00:00
# Entrypoints definition
#
# Optional
# Default:
# [entryPoints]
# [entryPoints.http]
# address = ":80"
#
# To redirect an http entrypoint to an https entrypoint (with SNI support):
# [entryPoints]
# [entryPoints.http]
# address = ":80"
# [entryPoints.http.redirect]
# entryPoint = "https"
# [entryPoints.https]
# address = ":443"
# [entryPoints.https.tls]
# [[entryPoints.https.tls.certificates]]
# CertFile = "integration/fixtures/https/snitest.com.cert"
# KeyFile = "integration/fixtures/https/snitest.com.key"
# [[entryPoints.https.tls.certificates]]
# CertFile = "integration/fixtures/https/snitest.org.cert"
# KeyFile = "integration/fixtures/https/snitest.org.key"
#
# To redirect an entrypoint rewriting the URL:
# [entryPoints]
# [entryPoints.http]
# address = ":80"
# [entryPoints.http.redirect]
# regex = "^http://localhost/(.*)"
# replacement = "http://mydomain/$1"
2016-07-21 15:05:58 +00:00
#
# To enable basic auth on an entrypoint
# with 2 user/pass: test:test and test2:test2
# Passwords can be encoded in MD5, SHA1 and BCrypt: you can use htpasswd to generate those ones
# [entryPoints]
# [entryPoints.http]
# address = ":80"
# [entryPoints.http.auth.basic]
# users = ["test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/", "test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0"]
#
# To enable digest auth on an entrypoint
# with 2 user/realm/pass: test:traefik:test and test2:traefik:test2
# You can use htdigest to generate those ones
# [entryPoints]
# [entryPoints.http]
# address = ":80"
# [entryPoints.http.auth.basic]
# users = ["test:traefik:a2688e031edb4be6a3797f3882655c05 ", "test2:traefik:518845800f9e2bfb1f1f740ec24f074e"]
2016-09-20 06:06:06 +00:00
#
# To specify an https entrypoint with a minimum TLS version, and specifying an array of cipher suites (from crypto/tls):
# [entryPoints]
# [entryPoints.https]
# address = ":443"
# [entryPoints.https.tls]
# MinVersion = "VersionTLS12"
# CipherSuites = ["TLS_RSA_WITH_AES_256_GCM_SHA384"]
# [[entryPoints.https.tls.certificates]]
# CertFile = "integration/fixtures/https/snitest.com.cert"
# KeyFile = "integration/fixtures/https/snitest.com.key"
# [[entryPoints.https.tls.certificates]]
# CertFile = "integration/fixtures/https/snitest.org.cert"
# KeyFile = "integration/fixtures/https/snitest.org.key"
2015-10-08 15:56:45 +00:00
2016-09-28 21:36:06 +00:00
# To enable compression support using gzip format:
# [entryPoints]
# [entryPoints.http]
# address = ":80"
# compress = true
2016-03-29 20:25:32 +00:00
# Enable retry sending request if network error
#
# Optional
#
# [retry]
# Number of attempts
#
# Optional
# Default: (number servers in backend) -1
#
# attempts = 3
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"
2016-01-13 21:46:44 +00:00
#
# Set REST API to read-only mode
#
# Optional
# ReadOnly = false
2015-09-22 19:00:29 +00:00
2016-09-15 13:24:22 +00:00
# To enable basic auth on the webui
# with 2 user/pass: test:test and test2:test2
# Passwords can be encoded in MD5, SHA1 and BCrypt: you can use htpasswd to generate those ones
2016-09-20 06:06:06 +00:00
# [web.auth.basic]
2016-09-15 13:24:22 +00:00
# users = ["test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/", "test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0"]
# To enable digest auth on the webui
# with 2 user/realm/pass: test:traefik:test and test2:traefik:test2
# You can use htdigest to generate those ones
2016-09-20 06:06:06 +00:00
# [web.auth.basic]
2016-09-15 13:24:22 +00:00
# users = ["test:traefik:a2688e031edb4be6a3797f3882655c05 ", "test2:traefik:518845800f9e2bfb1f1f740ec24f074e"]
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"
2016-07-14 09:32:15 +00:00
# Expose containers by default in traefik
#
# Optional
# Default: true
#
# exposedbydefault = true
2015-11-20 15:05:06 +00:00
# Enable docker TLS connection
#
2016-01-18 10:52:18 +00:00
# Optional
#
2015-11-20 15:05:06 +00:00
# [docker.tls]
# ca = "/etc/ssl/ca.crt"
# cert = "/etc/ssl/docker.crt"
2016-08-05 14:02:46 +00:00
# key = "/etc/ssl/docker.key"
# insecureskipverify = true
################################################################
# Docker Swarmmode configuration backend
################################################################
# Enable Docker configuration backend
#
# Optional
#
# [docker]
# Docker server endpoint. Can be a tcp or a unix socket endpoint.
#
# Required
#
# endpoint = "tcp://127.0.0.1:2375"
# Default domain used.
# Can be overridden by setting the "traefik.domain" label on a services.
#
# Required
#
# domain = "docker.localhost"
# Enable watch docker changes
#
# Optional
#
# watch = true
# Use Docker Swarm Mode as data provider
#
# Optional
#
# swarmmode = true
# Override default configuration template. For advanced users :)
#
# Optional
#
# filename = "docker.tmpl"
# Expose services by default in traefik
#
# Optional
# Default: true
#
# exposedbydefault = true
# Enable docker TLS connection
#
# Optional
#
# [swarm.tls]
# ca = "/etc/ssl/ca.crt"
# cert = "/etc/ssl/docker.crt"
2015-11-20 15:05:06 +00:00
# key = "/etc/ssl/docker.key"
# insecureskipverify = true
2016-09-20 14:56:29 +00:00
# Constraints
#
# Optional
#
# constraints = ["tag==api", "tag==he*ld"]
# Matching with containers having the label "traefik.tags" set to "api,helloworld"
# ex: $ docker run -d -P --label traefik.tags=api,helloworld emilevauge/whoami
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"
# 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"
2016-03-25 09:34:29 +00:00
# Expose Marathon apps by default in traefik
#
# Optional
# Default: false
#
2016-06-01 14:47:39 +00:00
# exposedByDefault = true
# Convert Marathon groups to subdomains
# Default behavior: /foo/bar/myapp => foo-bar-myapp.{defaultDomain}
# with groupsAsSubDomains enabled: /foo/bar/myapp => myapp.bar.foo.{defaultDomain}
#
# Optional
# Default: false
#
# groupsAsSubDomains = true
2016-03-25 09:34:29 +00:00
2016-01-18 10:52:18 +00:00
# Enable Marathon basic authentication
#
# Optional
#
# [marathon.basic]
# httpBasicAuthUser = "foo"
# httpBasicPassword = "bar"
2016-06-18 12:51:52 +00:00
# DCOSToken for DCOS environment, This will override the Authorization header
2016-02-09 22:10:24 +00:00
#
# Optional
#
2016-06-18 12:51:52 +00:00
# dcosToken = "xxxxxx"
2016-02-09 22:10:24 +00:00
2016-07-20 09:56:14 +00:00
################################################################
# Mesos configuration backend
################################################################
# Enable Mesos configuration backend
#
# Optional
#
# [mesos]
# Mesos server endpoint.
# You can also specify multiple endpoint for Mesos:
# endpoint = "192.168.35.40:5050,192.168.35.41:5050,192.168.35.42:5050"
# endpoint = "zk://192.168.35.20:2181,192.168.35.21:2181,192.168.35.22:2181/mesos"
#
# Required
#
# endpoint = "http://127.0.0.1:8080"
# Enable watch Mesos changes
#
# Optional
#
# watch = true
# Default domain used.
# Can be overridden by setting the "traefik.domain" label on an application.
#
# Required
#
# domain = "mesos.localhost"
# Override default configuration template. For advanced users :)
#
# Optional
#
# filename = "mesos.tmpl"
# Expose Mesos apps by default in traefik
#
# Optional
# Default: false
#
# ExposedByDefault = true
# TLS client configuration. https://golang.org/pkg/crypto/tls/#Config
#
# Optional
#
# [mesos.TLS]
# InsecureSkipVerify = true
2016-09-30 13:37:52 +00:00
# Zookeeper timeout (in seconds)
2016-07-20 09:56:14 +00:00
#
# Optional
#
# ZkDetectionTimeout = 30
2016-09-30 13:37:52 +00:00
# Polling interval (in seconds)
2016-07-20 09:56:14 +00:00
#
# Optional
#
# RefreshSeconds = 30
2016-09-30 13:37:52 +00:00
# IP sources (e.g. host, docker, mesos, rkt)
2016-07-20 09:56:14 +00:00
#
# Optional
#
# IPSources = "host"
2016-09-30 13:37:52 +00:00
# HTTP Timeout (in seconds)
#
# Optional
#
# StateTimeoutSecond = "host"
2016-04-20 11:43:37 +00:00
################################################################
# Kubernetes Ingress configuration backend
################################################################
# Enable Kubernetes Ingress configuration backend
#
# Optional
#
# [kubernetes]
# Kubernetes server endpoint
#
# When deployed as a replication controller in Kubernetes,
# Traefik will use env variable KUBERNETES_SERVICE_HOST
# and KUBERNETES_SERVICE_PORT_HTTPS as endpoint
# Secure token will be found in /var/run/secrets/kubernetes.io/serviceaccount/token
# and SSL CA cert in /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
2016-07-12 05:25:01 +00:00
#
2016-04-20 11:43:37 +00:00
# Optional
#
# endpoint = "http://localhost:8080"
2016-04-28 00:23:55 +00:00
# namespaces = ["default"]
2016-07-12 05:25:01 +00:00
#
# See: http://kubernetes.io/docs/user-guide/labels/#list-and-watch-filtering
# labelselector = "A and not B"
2015-09-14 13:38:58 +00:00
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
#
2016-08-08 09:53:00 +00:00
# prefix = "traefik"
2015-09-21 16:05:56 +00:00
# Override default configuration template. For advanced users :)
#
# Optional
#
# filename = "consul.tmpl"
2016-02-19 16:10:48 +00:00
# Enable consul TLS connection
#
# Optional
#
# [consul.tls]
# ca = "/etc/ssl/ca.crt"
# cert = "/etc/ssl/consul.crt"
# key = "/etc/ssl/consul.key"
# insecureskipverify = true
2016-09-20 14:56:29 +00:00
################################################################
# Consul Catalog configuration backend
################################################################
# Enable Consul Catalog configuration backend
#
# Optional
#
# [consulCatalog]
# Consul server endpoint
#
# Required
#
# endpoint = "127.0.0.1:8500"
# Default domain used.
#
# Optional
#
# domain = "consul.localhost"
# Prefix for Consul catalog tags
#
# Optional
#
# prefix = "traefik"
# Constraints
#
# Optional
#
# constraints = ["tag==api", "tag==he*ld"]
# Matching with containers having this tag: "traefik.tags=api,helloworld"
2015-09-21 16:05:56 +00:00
2015-10-03 14:51:14 +00:00
################################################################
# Etcd configuration backend
################################################################
# Enable Etcd configuration backend
#
# Optional
#
# [etcd]
# Etcd server endpoint
#
# Required
#
2016-07-11 11:36:35 +00:00
# endpoint = "127.0.0.1:2379"
2015-10-03 14:51:14 +00:00
# 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"
2016-02-19 16:10:48 +00:00
# Enable etcd TLS connection
#
# Optional
#
# [etcd.tls]
# ca = "/etc/ssl/ca.crt"
# cert = "/etc/ssl/etcd.crt"
# key = "/etc/ssl/etcd.key"
# insecureskipverify = true
2015-10-03 14:51:14 +00:00
################################################################
# 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]
2016-04-06 13:48:19 +00:00
# rule = "Host: test.localhost, other.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
2016-02-01 15:09:13 +00:00
# entrypoints = ["https"] # overrides defaultEntryPoints
# [frontends.frontend2.routes.test_1]
2016-03-31 10:59:50 +00:00
# rule = "Host:{subdomain:[a-z]+}.localhost"
2016-02-01 15:09:13 +00:00
# [frontends.frontend3]
# entrypoints = ["http", "https"] # overrides defaultEntryPoints
# backend = "backend2"
2016-07-12 05:25:01 +00:00
# rule = "Path: /test, /other"