Apache VirtualHosts using the latest mod_jk2 (2.04) for Win32 (both precompiled and self-compiled) that use JkUriSet directives within nested <Location/> blocks are not forwarding mapped JSP/Servlet requests to Tomcat via the mapped worker OTHER than for the main ServerName (URL). For example the following VirtualHost conf: ## LOAD MOD_JK2 LoadModule jk2_module modules/mod_jk2.so ## NameVirtualHost Entry NameVirtualHost 192.168.0.2 ## MYSITE VIRTUALHOST BLOCK <VirtualHost 192.168.0.2> ServerAdmin some1@somedomain.com ServerName www.mysite.com ServerAlias www2.mysite.com DocumentRoot "C:\www\mysite\ROOT" Alias /userimages "C:\www\mysite\userimages" CustomLog "C:\wwwlogs\mysite\www.mysite.com_apache.log" combined <Location "/*.jsp"> JkUriSet worker ajp13:localhost:8009 </Location> <Location "/servlet/*"> JkUriSet worker ajp13:localhost:8009 </Location> <Location "/WEB-INF/*"> JkUriSet worker ajp13:localhost:8009 </Location> </VirtualHost> Displays the following behaviour: When accessing on www.mysite.com (the main ServerName) all JSP requests work fine - no problems. When accessing on www2.mysite.com (the ServerAlias) only the very first JSP page (the main welcome file in the ROOT) is processed by Tomcat. After that Apache does not send the relevant JSP requests to the AJP worker and Tomcat for processing - the JSP files are treated as plain text and source returned to requesting browser.
This affects Linux as well. Suggest changing the OS to ALL
this is still an issue in 5.0.28 as well...
Of course it is an issue in 5.0.28. mod_jk2 is not updated when tomcat 5.0.x is updated.
As of November 15, 2004, JK2 is no longer supported. All bugs related to JK2 will be marked as WONTFIX. In its place, some of its features have been backported to jk1. Most of those features will be seen in 1.2.7, which is slated for release on November 30th, 2004. Another alternative is the ajp addition to mod_proxy which will be part of apache 2. For more information on the Tomat connectors docs at http://jakarta.apache.org/tomcat/connectors-doc/