{"message":"Router not found for request /sitea"}

Hi

I am trying to use path to route a site however I keep getting the error in the title :frowning:

I can make this work if I replace the Path with Host(sub.domain.com) but that isn not what I need here.

I also do not have any SSL problem, that part seems to be fine with the settings below.

Here is my dynamic conf

http:
 routers:
  sitea:
    rule: "Path(`/sitea`)"
    service: sitea
    tls:
     options: myTLSOptions

 services:
  sitea:
    loadBalancer:
     servers:
     - url: "http://127.0.0.1:4000/"
     passHostHeader: false

tls:
  certificates:
    - certFile: /etc/letsencrypt/live/SUB.DOMAIN.COM/fullchain.pem
      keyFile:  /etc/letsencrypt/live/SUB.DOMAIN.COM/privkey.pem
  options:
    myTLSOptions:
      minVersion: VersionTLS13
      cipherSuites:
        - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
        - TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
        - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
        - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
        - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256


I would appreciate help for sure, I have been scratching my head here for 6 hours with no real output, ready to jump off a bridge.

thanks

hello @tasteer

https://docs.traefik.io/routing/routers/#rule

  1. You have no entrypoints for your router. (but it is optionnal)

  2. Do you have something after /sitea ? If so, you may have to use PathPrefix instead of Path.

  3. Does your backend is configured to have an url with /sitea in its Path?

Since the path is forwarded as-is, your service is expected to listen on /products .
If not you should need to add a StripPrefix middleware to remove the prefix.

Thanks for the reply. I read those documents at least 10 times over and over, I still cant make it.

  1. See the config below. Traefik seems to pick thopse automatically

  2. I tried Path PathPrefix PathPrefixStrip etc with no success. I also tried Host && Path combo with no luck. I also tried all possible slash combinations with no luck as well.

  3. I do not think that it needs a url since I am able run it with simple rule: Host(sub.domain.com) without any issues. I seem to hit this when I replaece that with Path. For test I set up it with Apache, I use the same sub path in Apache, and Apache has no issue proxying that. This seems to traefik thing'

Here is a working conf for Apache

        AllowEncodedSlashes NoDecode
        ProxyPass /sitea/ http://127.0.0.1:4000/
        ProxyPassReverse /sitea/ http://127.0.0.1:4000/

traefik.yml

entryPoints:
  http:
    address: :80
  https:
    address: :443


providers:
  file:
    directory: /etc/traefik/dynamic
    watch: true