I've been stuck with this problem. I dont use docker, instead .toml files with a service. The error shows
level=error msg="middleware \"proxy-auth-Name@file\" does not exist" entryPointName=https routerName=subpage@file
I really don't know what it could be. I checked typos, I recheked it many times, am I missing something?
My dynamic file, dynamic.toml, reads
[http.routers]
[http.routers.subpage]
entryPoints = ["https"]
rule = "Host(`myhostname.website.com`) && PathPrefix(`/subpage`)"
middlewares = ["proxy-auth-Name"]
service = "subpage"
[http.routers.subpage.tls]
[http.services]
[[http.services.subpage.loadBalancer.servers]]
url = "http://172.18.25.161:6805"
Then I have 2 files, that I will call static files...these are static.toml and traefik.toml.
static.toml reads
[[tls.certificates]]
certFile = "/opt/traefik/SSL/mycert.pem"
keyFile = "/opt/traefik/SSL/mycert.key"
[http.routers]
[http.routers.http_catchall]
entryPoints = ["http"]
middlewares = ["https_redirect"]
rule = "HostRegexp(`{any:.+}`)"
service = "name"
[http.routers.name]
entryPoints = ["https"]
entryPoints = ["http"]
rule = "Host(`myhostname.website.com`)"
middlewares = ["sts"]
service = "name"
[http.routers.name.tls]
[http.services]
[[http.services.name.loadBalancer.servers]]
url = "http://172.18.25.159:8888"
# ip of hostname
[http.middlewares]
[http.middlewares.sts.headers]
stsSeconds = 63072000
stsIncludeSubdomains = true
stsPreload = true
[http.middlewares.https_redirect.redirectScheme]
scheme = "https"
permanent = true
[http.middlewares.proxy-auth-Name.forwardAuth]
address = "http://172.18.25.159:8888/proxy_auth/"
and traefik.toml reads
[entryPoints]
[entryPoints.traefik]
address = "172.18.25.159:8081"
[entryPoints.http]
address = ":10080"
[entryPoints.https]
address = ":10443"
[providers]
providersThrottleDuration = "2s"
[providers.file]
directory = "/opt/traefik/routes/"
watch = true
[api]
dashboard = true
[ping]
[log]
level = "INFO"
filePath = "/var/log/traefik/traefik.log"
[accessLog]
bufferingSize = 0
Any help is appreciated... proxy-auth-Name
only appears with forwardAuth
in traefik.toml, and that's all