I currently have Tomcat and Apache working together via mod_jk. All requests are sent to Tomcat, and certain directory/file types are sent back to Apache to serve.
# By default, all requests go to worker1
JkMount /* worker1
# Serve html, jpg, and gif using httpd
JkUnMount /images/*.jpg worker1
JkUnMount /images/*.gif worker1
JkUnMount /styles/*.css worker1
JkUnMount /scripts/*.js worker1
The above works just fine. The part I'm puzzled about is how to fit SSI into the picture. I just added SSI to both Tomcat and Apache by following these instructions:
* Tomcat is able to serve up a .shtml file fine. SSI works.
* Apache is able to serve up a .shtml file fine. SSI works.
* Apache is able to serve up a .html file that includes a SSI via the XbitHack (by making the .html file executable). SSI works.
What doesn't work: I'm unable to get a SSI (that's a .html file) within a dynamically created html file (created by Tomcat) to work. The include inside the dynamically generated html file looks something like this.
<!--#include virtual="/somemodule.html?param1=9¶m2=true" -->
Ideally, I would like Apache to send everything to Tomcat (as it is now), Tomcat to dynamically create the html file (as it is now), and for Tomcat to send the server side include back to Apache to process (don't know how to do). Is this do-able? If so how?
If this is not possible, then I'd like Tomcat to know how to process that include, which is a .html file. I'm only able to get Tomcat to process .shtml files for SSI. I've tried changing the following in $CATALINA_BASE/conf/context.xml to get it to include .html files instead (which probably isn't a good idea anyways?), but no luck.
<url-pattern>*.shtml</url-pattern> <--- tried changing this to *.html