Hi folks,
I'm a newbie to
Tomcat and I can't help but think I'm missing something obvious, but maybe you can help.
I have Apache2.2 and Tomcat6 running on the same server. I want to run Tomcat through Apache so that everything is accessible through the same hostname/port and protected by SSL (intranet portal). There is a lot of other stuff on the apache installation, so I would like Tomcat to have its own namespace under
https://my.host/tomcat/ . So far I have established that there are several ways to do this, but mod_proxy_ajp seems to be the latest and greatest. (is that correct?)
I have added the following lines to /etc/apache2/mods-enabled/proxy.conf:
ProxyPass /tomcat/ ajp://localhost:8009/
ProxyPassReverse /tomcat/ ajp://localhost:8009/
And the following to my Tomcat installation's server.xml:
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
Success! on
https://my.host/tomcat/ I can access the tomcat default page, however the urls of all the links have a path to my host's root. Eg the link to the manager application points to
https://my.host/manager/html, when it should be
https://my.host/tomcat/manager/html . The manager application is sitting where I want it, the link leads to a 404 until I manually correct in my address bar, adding the /tomcat/ in.
I've been struggling with this as every search I can think of seems to come up with answers about changing the filesystem path where applications are located on the server, rather than the url paths to access them. Do I need to use urlrewrite filter? It seems like an over-complicated solution for something that should have a simple Tomcat configuration option that I am missing.
Thanks for any input.