Hello guys. I’m having a little trouble with https redirection on traefik-v2. Below is my config…
## static configuration
[global]
checkNewVersion = true
sendAnonymousUsage = true
[serversTransport]
insecureSkipVerify = true
[entryPoints]
[entryPoints.web]
address = ":80"
[entryPoints.web-secure]
address = ":443"
[api]
debug = true
[log]
level = "DEBUG"
[providers.file]
[providers.docker]
exposedByDefault = false
## dynamic configuration (require the file provider)
[[tls]]
store = ["default"]
[tls.certificate]
certFile = "/opt/localcerts/arara-docker-dev.us.pem"
keyFile = "/opt/private/arara-docker.key"
[tlsStores]
[tlsStores.default]
[tlsStores.default.defaultCertificate]
certFile = "/opt/localcerts/arara-docker-dev.us.pem"
keyFile = "/opt/private/arara-docker.key"
And here is how i get my container running.
docker run -d --name Espelho \
-l 'traefik.enable=true' \
-l 'traefik.http.routers.web.rule=Host(`espelho.dev.us`)' \
-l "traefik.http.middlewares.test-redirectscheme.redirectscheme.scheme=https" \
-l 'traefik.http.routers.web.middlewares=https_redirect' \
-l 'traefik.http.routers.web-secure.rule=Host(`espelho.dev.us`)' \
-l 'traefik.http.routers.web-secure.tls=true' \
jboss5-1
What happens is that when i access ‘espelho.dev.ufs’ it is successfully redirected to the https site. However, when i access https://espelho.dev.us/admin i get a 404. When i remove the web-secure.tls i can use the application successfully without https. What’s happening, why isn’t https working?