I have got a tomcat instance with several applications running onto it... I would like the main of my new domain to visit one of these simple applications (context path of blah).. and so i possess the following setup:
<Location /> ProxyPass ajp://localhost:8025/blah ProxyPassReverse ajp://localhost:8025/blah </Location>
it kinda works... likely to mydomain.com/index.jsp works except the application still thinks it must add the /blah/ to everything like css and js.. can there be something I'm able to do without implementing the application to ROOT or altering the tomcat server config? Let me keep all of this type of factor around the apache side, whether it's possible.
I am thinking I might not be comprehending the proxypassreverse directive..
If you are attempting to server the application the /, Tomcat needs the application to become mounted at /, and also have the title of ROOT. A minimum of that's how I have always handled the problem personally. Even when you simply symlink the application into ROOT, which should mitigate your problems. For those who have an application put into $/webapps/newapp, then Tomcat deploys it having a context of /newapp. A minimum of, which has been the situation during my history. Also, unsure whether it matters but I have always used:
ProxyPass / ajp://localhost:8025/blah ProxyPassReverse / ajp://localhost:8025/blah
it appears such as this is type of a pain in the rear.
apache generally is spinning pages because it serves them...
I believe I'll go another route.
Should you configure hosts around the Tomcat side too you'll be able to proxy for them and get rid of the context path for non-root webapps--in Tomcat server.xml:
<Host name="myhost"> <Context path="" docBase="/path/to/files" /> </Host>
As well as on the Apache side:
<VirtualHost *:80> ServerName myhost ProxyPass / ajp://myhost:8009/ ProxyPassReverse / ajp://myhost:8009/ </VirtualHost>
Hope that can help.