This is probably a simple problem but I just can't seem to solve it! I have a website running 2 Apache Tomcats on different ports (e.g. 8080, 8085). However since my customers cannot access specific ports (their firewalls prevent this) they can only access my machine from port 80.
So I got the following redirects to work:
aServer.com/App1 redirects to aServer.com:8080/App1
aServer.com/App2 redirects to aServer.com:8085/App2
using the following httpd.conf file:
<VirtualHost *:80>
ProxyPass /App1 http://<server ip address>:8080/App1
ProxyPassReverse /App1 http://<server ip address>:8080/App1
ProxyPass /App2 http://<server ip address>:8085/App2
ProxyPassReverse /App2 http://<server ip address>:8085/App2
</VirtualHost>
However if I want to deploy an application as a ROOT webapp in Tomcat, then I can't get the redirect to work properly. I modified httpd.conf to:
ProxyPass /App2 http://<server ip address>:8085
ProxyPassReverse /App2 http://<server ip address>:8085
and now only the index.html page is returned and every dependency from the webpage (e.g. tomcat.css, tomcat.png) results in a not found error (
NetworkError: 404 Not Found - http://myServer/tomcat.css
)
Can anyone explain what I am doing wrong?
Thanks,
Phil