Hello everyone,
I use Traefik for a year now at work and home. Everything works great, but I'm struggling with the same problem for a long time.
I would like to use a single entrypoint with a specific port as 12345 for example, but I cannot manage to succeed to make the redirection work for this single entrypoint.
I have tried to make the configuration in the dynamic file (the single entrypoint is well defined in my static file, well exposed and well redirect in my router) with:
http:
routers:
http-catchall:
entryPoints:
- single
middlewares:
- securisation #a chain with redirectScheme, compress & headers
rule: HostRegexp(`{any:.+}`)
service: dummy
tls:
certResolver: letsencrypt
domains:
- main: "*.domain.tld"
sans:
- "domain.tld"
services:
dummy:
loadBalancer:
servers:
- url: ""
I also tried to make the redirection in the static file with the 2.2 version as following:
entryPoints:
single:
address: ":12345"
http:
redirections:
entryPoint:
to: single
scheme: https
permanent: true
middlewares:
- compress@file
- headers@file
tls:
certResolver: letsencrypt
domains:
- main: "*.domain.tld"
sans:
- "domain.tld"
But the comportment is the same when I type http://domain.tld:12345, I have a 404 error with no https...
(but it's working when I use two entrypoint like 80 and 443 to make the redirection)
Is anyone succeed to make this?
PS: sorry for my English, it is not my birth language