Hi,
I run Traefik 2 on a kubernetens cluster (microk8s)
I am using Traefik succesfully using subdomains in front of my domainname to route to my containers.
When I try to route based on a path I think I am stumbling on containers that serve webpages relative to root.
Example:
gitea.mydomain,com works fine.
www.mydomain.com/gitea dos not work.
I tried to use stripprefix in a middleware but I think that is nog enough.
Is ther an aexample yaml how to do this?
Would appreciate help on this.
My route:
kind: IngressRoute
metadata:
name: gitea-http
spec:
entryPoints:
- web
routes:
- match: Host(
www.mydomain.com
) && PathPrefix(/gitea/
)
kind: Rule
middlewares: - name: gitea-middleware
namespace: default
services:- name: gitea
port: 3000
- name: gitea
My middleware:
kind: Middleware
metadata:
name: gitea-middleware
spec:
stripPrefix:
prefixes:
- /gitea
forceSlash: false