3

I would like to change an apache/tomcat ProxyPass configuration to a traefik/tomcat configuration in Docker Swarm. I've try some explained here https://docs.traefik.io/basics/#frontends, but it doesn't work:

Apache config:

ProxyPass       /sso ajp://server_host:8080/app
ProxyPassReverse    /sso ajp://server_host:8080/app

Docker Swarm config:

Traefik config in my docker-compose file:
traefik.frontend.rule=Host:external_dns;PathPrefix:/sso;ReplacePath:/app

And tomcat in docker image with a war application (context "app")

But it doesn't work, /sso is redirected (302) to /app

Who can i do a redirect from fontend to backend ?

thanks

Nicola Ben
  • 10,615
  • 8
  • 41
  • 65

1 Answers1

3

The problem was solved after editing the param ReplacePathRegex:

traefik.frontend.rule=Host:external_dns;PathPrefix:/sso;ReplacePathRegex:^/sso/(.*) /app/$$1
Nicola Ben
  • 10,615
  • 8
  • 41
  • 65