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:
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.
Actually, the ajp proxy is used more commonly to hide Tomcat, rather than to make it visible. For example, I might set up a URL to http://www.myserver.com/webapp1 which is proxied via ajp to www.myserver.com:8009/webapp1, where "webapp1" is the WAR deployed under the Tomcat responding via ajp at port 8009.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Oct 25, 2010
I'm not particularly bothered about the cosmetic aspects of having first-level URLs, the only restriction on that is that everything must be under the same hostname so our single-domain SSL certificate remains valid. My thinking was that I could create a namespace for Tomcat and then manage my application deployments through Tomcat without having to modify my Apache configuration all the time. From looking around it seems that this is not possible (or at least, not straightforward enough to be worthwhile). I have things working with first-level URLs as you describe, so I guess that's the way forward.
You could probably cobble up some sort of mechanism to do what you want, but it's probably not worth the effort.
Most installations keep a fairly static list of webapps, so maintaining them manually isn't considered a big deal.
In my case, I build deployables as OS install packages (usually for Red Hat Linux), and that means that when I deploy, the package manager adds a config file with the ajp proxy info and other apache-specific stuff to /etc/httpd/conf.d, copies the WAR to the /opt (installed 3d-party applications) directory tree, and sets up a context xml file in the TOMCAT_HOME/conf/Catalina/localhost directory.