Problem Traefik Ingress Angular7 + ApacheHttp

I am trying to use the path based routing mechanism provided by Traefik ingress controller in Kubernetes but I have some issues with the url rewriting.

My configuration
Screenshot%20from%202019-08-09%2013-28-31

The traffic is routed to the right services but the url is still prefixed with /db when I look at the log for the db-manager (kubernetes) service. What I would have expected with the PathPrefixStrip is that the traffic will be routed without the /db prefix to the container running the db-manager micro-service which is listening on / (db-manager:8081) on the backend side.

Am I missing something ? Is it supported by traefik or only nginx ? Thank you by advance for your feedback.
To be more specific I observe the following with the current annotations discussed below
traefik.ingress.kubernetes.io/rule-type: "PathPrefixStrip"
traefik.ingress.kubernetes.io/rewrite-target: "/"

URL: local-ubuntu/db [OK] -> 200
Then other resources are loading but are pointing on the wrong base url

Example:
Resource URL is : local-ubuntu/public/css/bootstrap.min.css
But this should be : local-ubuntu/db/public/css/bootstrap.min.css (which works when I've tried manually)
I am not sure what I am missing here in the current configuration.

Hello @rafambbr,

Try with one of the following:
traefik.ingress.kubernetes.io/rule-type: "PathPrefixStrip"
traefik.ingress.kubernetes.io/rewrite-target: "/"

They both achieve similar results, but they are different, and they have slightly different behavior.

I would read more on our documentation for the differences: (Kubernetes Ingress | Traefik | v1.7)

As for your second issue:

You stripped that path from the request...your DB service never sees the DB prefix...How is it supposed to know to add them back in?

You need to set a root URL in your web application to handle the stripped path.

Once you do that, you may not even need to strip the path at all, and just leave it as is. If you cannot set a base URL for your application, you may not be able to use directories for routing, and may have to use subdomains instead.