Proxy path to root with moodle

Hello there,

I'm currently trying to deploy bitnamis moodle in docker. Unforotunally I need to deploy it under Domain/moodle but the targeted container deploys under /. I'm trying it with the following config:

    labels:
      - "traefik.enable=true"
      - "traefik.http.middlewares.mll-moodle-stripprefix.stripprefix.prefixes=/moodle"
      - "traefik.http.routers.mll-moodle-secure.rule=((Host(`domain`) && PathPrefix(`/moodle{regex:$$|/.*}`))||(Host(`domain`)&&PathPrefix(`/moodle{regex:$$|/.*}`)))"
      - "traefik.http.routers.mll-moodle-secure.entrypoints=websecure"
      - "traefik.http.middlewares.mll-moodle-proxyheaders.headers.hostsProxyHeaders=true"
      - "traefik.http.routers.mll-moodle-secure.middlewares=internal-services@file, mll-moodle-proxyheaders, mll-moodle-stripprefix"
      - "traefik.http.services.mll-moodle-secure.loadbalancer.server.port=8080"
      - "traefik.http.routers.mll-moodle-secure.tls.certresolver=lets-encrypt"

Unfortunally I'm ending in redirect loops initated by moodle I guess since I'm stripping the /moodle from the url and moodle redirects me to /moodle, since this is the configured moodle-host. Does anyone have any experience with this?

My traefik.yml:

providers:
  docker:
    exposedByDefault: false
    network: behind_traefik
  file:
    directory: /config/dynamic_conf
    watch: true

entryPoints:
  web:
    address: ":80"
    http:
      redirections:
        entryPoint:
          to: websecure
          scheme: https
          permanent: false
  websecure:
    address: ":443"
    forwardedHeaders:
      insecure: true
    http:
      tls: true

certificatesResolvers:
  lets-encrypt:
    acme:
      email: "mail"
      storage: "/letsencrypt/acme.json"
      tlschallenge: true
api:
  dashboard: true
  insecure: true

log:
  level: INFO

Thanks everyone, I hope this is the correct place to ask

Hi @nils !

Have you managed to solve the problem? I'm trying to do the same as you and I'm in the same situation.

Thanks!