Securing a web app behind a reverse proxy. On successful login, all requests includes tomcat context

Hi,

I’ve configured keycloak-17/Quarkus and an application (tomcat spring MVC) with KC adapter. Every thing seems to work as expected but… both kc and the app are behind a reverse proxy (apache).

using http not https yet

keycloak runs on 0.0.0.0:8080 and is accesible at: auth.domain.local:80
the tomcat+app runs on 127.0.0.1:8082/myapp is accessible at: www.domain.local:80

Is secured via KC adapter and spring security for pre-auth. Once the authenticated the redirect url is:
www.domain.local/myapp/ Seems KC registers www.domain.local/myapp/ despite www.domain.local
so all requests must be done to www.domain.local/myapp/

Is there a way to configure KC adapter so redirects are to www.domain.local/ and not www.domain.local/myapp/? or the only way is by configure the app at tomcat ROOT context. If this is the solution what happends with severals apps on the same tomcat

Thanks in advance