2018-11-27 16:42:04 +00:00
|
|
|
[log]
|
2018-07-31 09:28:03 +00:00
|
|
|
logLevel = "DEBUG"
|
|
|
|
|
|
|
|
|
|
|
|
[entryPoints]
|
|
|
|
[entryPoints.http]
|
|
|
|
address = ":8888"
|
2018-11-14 09:18:03 +00:00
|
|
|
|
2018-07-31 09:28:03 +00:00
|
|
|
[entryPoints.https]
|
|
|
|
address = ":8443"
|
|
|
|
[entryPoints.https.tls]
|
|
|
|
|
|
|
|
[api]
|
|
|
|
|
2018-11-27 16:42:04 +00:00
|
|
|
[providers]
|
|
|
|
[providers.file]
|
2018-07-31 09:28:03 +00:00
|
|
|
|
2018-11-14 09:18:03 +00:00
|
|
|
[Routers]
|
|
|
|
[Routers.router1]
|
|
|
|
Service = "service1"
|
|
|
|
Middlewares = ["redirect-https"]
|
|
|
|
Rule = "Host: example.com"
|
|
|
|
|
|
|
|
[Routers.router2]
|
|
|
|
Service = "service1"
|
|
|
|
Middlewares = ["redirect-https", "api-slash-strip"]
|
|
|
|
Rule = "Host: example2.com"
|
|
|
|
|
|
|
|
[Routers.router3]
|
|
|
|
Service = "service1"
|
|
|
|
Middlewares = ["redirect-https", "foo-add-prefix"]
|
|
|
|
Rule = "Host: test.com"
|
|
|
|
|
|
|
|
[Routers.router4]
|
|
|
|
Service = "service1"
|
|
|
|
Middlewares = ["redirect-https", "foo-slash-add-prefix"]
|
|
|
|
Rule = "Host: test2.com"
|
|
|
|
|
|
|
|
[Routers.router5]
|
|
|
|
Service = "service1"
|
|
|
|
Middlewares = ["redirect-https", "id-strip-regex-prefix"]
|
|
|
|
Rule = "Host: foo.com"
|
|
|
|
|
|
|
|
[Routers.router6]
|
|
|
|
Service = "service1"
|
|
|
|
Middlewares = ["redirect-https", "id-slash-strip-regex-prefix"]
|
|
|
|
Rule = "Host: foo2.com"
|
|
|
|
|
|
|
|
[Routers.router7]
|
|
|
|
Service = "service1"
|
|
|
|
Middlewares = ["redirect-https", "api-regex-replace"]
|
|
|
|
Rule = "Host: bar.com"
|
|
|
|
|
|
|
|
[Routers.router8]
|
|
|
|
Service = "service1"
|
|
|
|
Middlewares = ["redirect-https", "api-slash-regex-replace"]
|
|
|
|
Rule = "Host: bar2.com"
|
|
|
|
|
|
|
|
[Routers.router9]
|
|
|
|
Service = "service1"
|
|
|
|
Middlewares = ["redirect-https", "api-replace-path"]
|
|
|
|
Rule = "Host: pow.com"
|
|
|
|
|
|
|
|
[Routers.router10]
|
|
|
|
Service = "service1"
|
|
|
|
Middlewares = ["redirect-https", "api-slash-replace-path"]
|
|
|
|
Rule = "Host: pow2.com"
|
|
|
|
|
|
|
|
[Middlewares]
|
|
|
|
[Middlewares.api-strip.StripPrefix]
|
|
|
|
prefixes = ["/api"]
|
|
|
|
[Middlewares.api-slash-strip.StripPrefix]
|
|
|
|
prefixes = ["/api/"]
|
|
|
|
[Middlewares.foo-add-prefix.AddPrefix]
|
|
|
|
prefix = "/foo"
|
|
|
|
[Middlewares.foo-slash-add-prefix.AddPrefix]
|
|
|
|
prefix = "/foo/"
|
|
|
|
[Middlewares.id-strip-regex-prefix.StripPrefixRegex]
|
|
|
|
regex = ["/{id:[a-z]+}"]
|
|
|
|
[Middlewares.id-slash-strip-regex-prefix.StripPrefixRegex]
|
|
|
|
regex = ["/{id:[a-z]+}/"]
|
|
|
|
[Middlewares.api-regex-replace.ReplacePathRegex]
|
|
|
|
regex = "/api"
|
|
|
|
replacement = "/"
|
|
|
|
[Middlewares.api-slash-regex-replace.ReplacePathRegex]
|
|
|
|
regex = "/api/"
|
|
|
|
replacement = "/"
|
|
|
|
[Middlewares.api-replace-path.ReplacePath]
|
|
|
|
path = "/api"
|
|
|
|
[Middlewares.api-slash-replace-path.ReplacePath]
|
|
|
|
path = "/api/"
|
2019-01-22 07:30:04 +00:00
|
|
|
[Middlewares.redirect-https.redirectScheme]
|
|
|
|
scheme = "https"
|
|
|
|
port = "8443"
|
2018-11-14 09:18:03 +00:00
|
|
|
|
|
|
|
[Services]
|
|
|
|
[Services.service1]
|
|
|
|
[Services.service1.LoadBalancer]
|
2018-08-14 16:38:04 +00:00
|
|
|
|
2018-11-14 09:18:03 +00:00
|
|
|
[[Services.service1.LoadBalancer.Servers]]
|
|
|
|
URL = "http://127.0.0.1:80"
|
|
|
|
Weight = 1
|