Access to services using paths

First to all, sorry if my english are appalling, i'm learning and i trying to write this w/o translator

Now, i have set traefik to access my services using this label of rules

traefik.http.routers.<my-service>.rule=Host(<my-service>.<mydomain>.duckdns.org) || HostRegexp(^(<my-server>\.(lcl|wrg|ztr)$) && PathPrefix(/<my-service>)

The first rule works perfectly, even i set correctly the certificates generation with Let'sEncrypt. The problem it's with the second rule, i changed the "Base URL" of my services to "/<service-name>" (this because traefik preserve the PathPrefix on internal redirection and receive error 404) when i do it some services works fine, but another services not have that option and i can't access it (by example portainer), also i tryed to set a stripprefix middleware but does not work on my case (or i dont know how set it)

PD: Now I'm only using a VPN tunnelings to access my services(by that the domains lcl=local, wrg=wireguard and ztr=zerotier on my servernames of the second rule), the first rule is only the pre-settings for future exposure

  1. Usually Traefik LetsEncrypt TLS certs are only available for public domains in DNS. So for imaginary TLDs like .lcl you can’t get a valid cert.

  2. Traefik LetsEncrypt will only auto-generate TLS certs for spelled out domains in Host(), HostSNI() or main/sans, not for HostRegex().

  3. You can’t place any GUI web app under a path, even when using StripPrefix, as the initial page usually includes absolute paths (like /static/script.ks), which won’t be matched with prefix. It only works when you can set a "base path" in the web app config.

1 Like

1) Isn't my current problem, but i know that about LetsEncrypt, cuz i already set in my primary rule (my future external domain)

2) I don't worry by this, i eventually i will set a selftsigned cert to my internal addresses, cuz some of my services i will think set it to access it only over this way (over vpn tunneling) for example portainer, traefik, pi-hole and anothers maneagemment services of the server

3) This is my current problem, I thought exactly that, so i will go though another way to set my internal addreses without use /paths to avoid this problem

Thxns for your response and assistance

(PD: Again, i sorry if my english isn't good, i'm learned some but i never practice it)