Skip to content

Instantly share code, notes, and snippets.

@aek
Created January 29, 2018 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aek/5ea85c4609e7028be86f31b61991abdb to your computer and use it in GitHub Desktop.
Save aek/5ea85c4609e7028be86f31b61991abdb to your computer and use it in GitHub Desktop.
debug traefik redirect config
[backends]
[backends.aek]
[backends.aek.servers.instance]
url = "http://127.0.0.1:8079"
[frontends]
[frontends.aek-redirect]
entrypoints = ["http"]
[frontends.aek-redirect.Redirect]
Regex = "(http://mio.aek/|http://www.mio.aek/|https://mio.aek/)"
Replacement = "https://www.mio.aek"
[frontends.aek]
backend = "aek"
passHostHeader = true
entrypoints = ["http"]
[frontends.aek.routes.instance]
rule = "Host:aek.localhost"
[backends]
[backends.mansuera]
[backends.mansuera.servers.instance]
url = "http://127.0.0.1:8069"
[frontends]
[frontends.mansuera-redirect]
entrypoints = ["http"]
[frontends.mansuera-redirect.Redirect]
Regex = "(http://mansuera.aek/|http://www.mansuera.aek/|https://mansuera.aek/)"
Replacement = "https://www.mansuera.aek"
[frontends.mansuera.routes.instance2]
rule = "Host:mansuera.aek"
[frontends.mansuera]
backend = "mansuera"
passHostHeader = true
entrypoints = ["http"]
[frontends.mansuera.routes.instance1]
rule = "Host:www.mansuera.aek"
debug = true
defaultEntryPoints = ["http"]
logLevel = "DEBUG"
[entryPoints]
[entryPoints.http]
address = ":8080"
compress = true
[file]
directory = "/home/axel/go-workspace/traefik/conf.d/"
watch = true
trace = true
DebugLogGeneratedTemplate = true
[web]
address = ":8089"
#run --configFile=/home/axel/go-workspace/traefik/traefik.toml
[accessLog]
filePath = "/var/log/traefik_access.log"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment