Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 35761 invoked from network); 6 May 2002 19:38:12 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 6 May 2002 19:38:12 -0000 Received: (qmail 25980 invoked by uid 97); 6 May 2002 19:37:50 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 25917 invoked by uid 97); 6 May 2002 19:37:49 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 25865 invoked by uid 98); 6 May 2002 19:37:49 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <001e01c1f536$1e2ae010$61ea627e@jeff> From: "Jeff" To: Subject: Does mod_webapp support name-based virtual TOMCAT hosts? Date: Mon, 6 May 2002 15:42:12 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I'm having a bit of a problem getting mod_webapp to work with Tomcat 4.0.3 and Apache 1.3.19. What I'm trying to achieve: multiple independent name-based virtual hosts (say, tomcat.i300.net and notjeff.i300.net) for both Apache and Tomcat, each with their own independent Tomcat webapp directories and capable of independently mapping paths within their namespace without regard to one another. In other words, tomcat.i300.net/foo might correspond to the "foo" webapp deployed to the tomcat.i300.net virtual host and be physically located at /home/i300/foo, and notjeff.i300.net/foo might correspond to the "foo" webapp deployed to the notjeff.i300.net virtual host and be physically located at /home/notjeff/foo. Yes, this is a trivial example to get it to work in the first place... the real webapps use Struts and need to be kept apart so they won't clobber each other. My efforts so far: I haven't even addressed the matter of getting the second host (notjeff.i300.net) to work yet, because the FIRST one continues to elude me. My Tomcat server.xml file (below) has a more or less unchanged default virtual host container, as well as a virtual host for "tomcat.i300.net". Going straight to Tomcat at port 8080, virtual hosts seem to be working properly. My Apache httpd.conf file (below) has the expected lines to use mod_webapp, as well as a virtual host defintion for tomcat.i300.net. The virtual host's Tomcat-defined appDir is /export/home/jeff/tomcat. The virtual host's Apache-defined DocumentRoot is /export/home/jeff/tomcat. mod_webapp is supposed to be mapping requests to http://tomcat.i300.net/test to Tomcat's "tomcat.i300.net" virtual server What's really happening -- http://tomcat.i300.net/index.html WORKS. Apache returns the site's index.html file, located at /export/home/jeff/tomcat/test/index.html http://tomcat.i300.net:8080/index.jsp WORKS. Tomcat returns the site's index.jsp file, located at /export/home/jeff/tomcat/test/index.jsp http://tomcat.i300.net/test and http://tomcat.i300.net/test/index.jsp BOTH HANG. The Warp logfile (below) reports that it was unable to deploy the application "test" into Tomcat's (DEFAULT) webapp directory. Which appears to uncover an even bigger problem, because it's not SUPPOSED to be deploying the "test" application into Tomcat's default webapps directory... it's supposed to be deploying it into tomcat.i300.net's equivalent -- presumably, /export/home/jeff/tomcat ! Is mod_webapp simply broken and unable to handle multiple sandboxed virtual instances of Tomcat mapped to separate Apache virtual hosts, or did I do something wrong in one of the config files? As far as I can tell, mod_jk explicitly CAN'T do this because it can't handle Tomcat virtual hosts, and forces all apache virtual hosts to share a common namespace for its path mapping. So mod_jk could globally map /test from ALL of Apache's virtual hosts to a single web app deployed to Tomcat, but can't use the same name in different contexts to map /test to a different webapp in a different instance for every virtual host. I originally hacked it to work using mod_rewrite to proxy incoming requests from port 80 to port 8080 of the appropriate virtual server, but I'd really like to get it working the RIGHT way. ********************************************************* WEB.XML -- ****************************************************************** HTTPD.CONF -- LoadModule webapp_module libexec/mod_webapp.so AddModule mod_webapp.c WebAppConnection tomcat warp localhost:8008 #... ServerAdmin jeff@tiaxa.net DocumentRoot /export/home/jeff/tomcat/test ServerName tomcat.i300.net ErrorLog /export/home/jeff/tomcat.err WebAppDeploy test tomcat /test *************************************** warp's error log -- 2002-05-06 14:56:52 [org.apache.catalina.connector.warp.WarpConnector] Connection from /127.0.0.1:34274 to /127.0.0.1:8008 2002-05-06 14:56:52 [org.apache.catalina.connector.warp.WarpConfigurationHandler] Cannot find "/usr/local/jakarta-tomcat-4.0.3-LE-jdk14/webapps/test" for appl. "test" host "tomcat.i300.net" 2002-05-06 14:56:52 [org.apache.catalina.connector.warp.WarpConfigurationHandler] Error deploying web application "test" under -- To unsubscribe, e-mail: For additional commands, e-mail: