Re: Lost my CCS and resources with mod_proxy and Tomcat

2019-08-30 Thread Mark Thomas
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]
> 
> 
> 
> 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
> 
>   
> 
> 
> 
> 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



Re: Lost my CCS and resources with mod_proxy and Tomcat

2019-08-29 Thread tomcat

On 29.08.2019 22: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]

 

 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

   



The app doesnt have any css or javascritp code

Any cluees about this ?




Maybe but not with the minimal information that you provide above.

First of all, when you are posting a question here about tomcat, provide
- the version of tomcat
- the version of the Java JVM
- which platform (OS) this is running on
- and in your particular case, the version of the apache httpd proxy that you 
are using
In 99% of the cases, this will be useful and will save questions/answers later.

Then, give us an example of the URL that you are using, to call the first page of the 
application.
(According to your explanation and configuration above, this is a URL that should start 
with "http://(your_proxy_server_name)/me")


Then, when you get the first page of your app in the browser, look at the source code of 
the page (in the browser), and look at the links which are supposed to load your 
"resources" (javascript, CSS etc..).

What do these links look like ?
(give us an example)

Maybe also (to gain time and avoid other multiple questions/answers), copy-and-paste the 
content of your tomcat server's "conf/server.xml" file here, and tell us where these 
resources are located on the tomcat server (their disk path).

(edit any confidential information)



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



Lost my CCS and resources with mod_proxy and Tomcat

2019-08-29 Thread Edwin Quijada
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]



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

  



The app doesnt have any css or javascritp code

Any cluees about this ?