Bug 28758 - Virtual Host aliases not being routed to Tomcat.
Summary: Virtual Host aliases not being routed to Tomcat.
Status: RESOLVED WONTFIX
Alias: None
Product: Tomcat Connectors
Classification: Unclassified
Component: Common (show other bugs)
Version: unspecified
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-04 07:12 UTC by Carl Olivier
Modified: 2008-10-05 03:09 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Olivier 2004-05-04 07:12:28 UTC
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.
Comment 1 jks 2004-06-08 23:16:54 UTC
This affects Linux as well. Suggest changing the OS to ALL
Comment 2 Blake Binkley 2004-09-21 12:25:29 UTC
this is still an issue in 5.0.28 as well...
Comment 3 jks 2004-10-05 01:31:49 UTC
Of course it is an issue in 5.0.28.  mod_jk2 is not updated when tomcat 5.0.x is
updated.
Comment 4 Yoav Shapira 2004-11-29 19:52:36 UTC
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/