On 29/08/2019 23:49, Edwin Quijada wrote:
> Hi!
> I have an application developed with Grails3 and Postgres, my app runs fine 
> in the port 8084 , https://server:8084/app now I am trying to put an apache 
> proxy with mod_proxy but I have an weird error
> The app load but doesnt load the resources, CSS and JavaScript, so the app 
> looks useless
> 
> [configuration for proxy]
> <IfModule mod_ssl.c>
>         <VirtualHost _default_:443>
> 
>                 ProxyPreserveHost on
>                 RequestHeader set X-Forwarded-Proto https
>                 RequestHeader set X-Forwarded-Port 443
> 
>                 ProxyPass /me  http://localhost:8084/menuapp/login
>                 ProxyPassReverse /me http://localhost:8084/menuapp/login
> 
>   </VirtualHost>
> </IfModule>
> 
> 
> The app doesnt have any css or javascritp code
> 
> Any cluees about this ?

Changing the context path (/me -> /menuapp/login) is rarely as simple as
adding ProxyPass and ProxyPassReverse.

In the past I have spent days with a customer trying to fix all the
issues this created for just one of their applications.

My very strong recommendations in this area are:

1. Make sure the web application deployed to Tomcat works correctly
regardless of the context path it is deployed to. i.e. don't hard-code
the context path anywhere and ensure it works for ROOT and multi-level
contexts.

2. Never change the context path to a web application in a reverse proxy.

3. If you want to have an identifier in the WAR's file name but don't
want the identifier in the context path (since the path is derived from
the name of the WAR file) (ab)use the parallel deployment version marker
and name your war context-path-you-want##identifier.war

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to