Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 403C463B8 for ; Tue, 7 Jun 2011 15:32:39 +0000 (UTC) Received: (qmail 42831 invoked by uid 500); 7 Jun 2011 15:32:35 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 42715 invoked by uid 500); 7 Jun 2011 15:32:35 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 42706 invoked by uid 99); 7 Jun 2011 15:32:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2011 15:32:35 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mkennedy@oucpm.org designates 66.143.19.3 as permitted sender) Received: from [66.143.19.3] (HELO gwaihir.oucpm.org) (66.143.19.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2011 15:32:29 +0000 Received: from win7test (win7test.oucpm.org [192.168.50.213]) by gwaihir.oucpm.org (gwaihir) with ESMTP id AF2057806D for ; Tue, 7 Jun 2011 10:32:07 -0500 (CDT) Reply-To: From: "Mike Kennedy" To: Subject: Multiple hosts pointing to different index files for one webapp Date: Tue, 7 Jun 2011 10:32:03 -0500 Organization: OU Center for Public Management Message-ID: <015901cc2528$0d221a00$27664e00$@org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_015A_01CC24FE.244C1200" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcwlKAzL2z+3OS1FRjqTwrMFH11ajQ== Content-Language: en-us X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_015A_01CC24FE.244C1200 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I have been asked to launch a new webapp in Tomcat via different URLs, with each URL pointing to a different launch page for the same app. For example: portal1.com --> webapps/portalapp/portal1_index.jsp portal2.com --> webapps/portalapp/portal2_index.jsp I don't know if this should be done by the app itself, or if there is a simple/complicated way to do it in Tomcat. I have researched through the O'Reilley Tomcat book, tomcat docs, and various forums, and have not found any config documentation to do it. A welcome-file specification in the app's web.xml doesn't seem to cut it, and I have tried to rig an Apache proxy but still cannot get the right index file to be called first. Likely I just do not fully understand some settings in Tomcat or Apache to do this right (perhaps 'appBase' under or 'path' and 'docBase' under can be used), hence I come to you. Any assistance is much appreciated. I hope my description is clear; if there is more info/config stuff I can post let me know. I am running Tomcat 5.5.23 and Apache 2.2.3 on Redhat Linux 5, with jdk-1.6.0_07-fcs. Here are some relevant sections of my configs that get me as close as I have come. I can launch the app by domain URL, but not without still specifying the index page in the URL (http://portal1.com/ won't work, have to use http://portal1.com/portal1_index.jsp). from server.xml: from httpd.conf: DocumentRoot /var/www/html/portal1 ServerName portal1.com allow from all Options -Indexes DirectoryIndex portal1_index.jsp # Added to proxy for Tomcat ProxyRequests Off Order deny,allow Allow from all ProxyPass / http://portal1.oucpm.org:8080/ ProxyPassReverse / http://portal1.oucpm.org:8080/ ProxyVia On ProxyPreserveHost Off Again, many thanks for your consideration. -Mike ------=_NextPart_000_015A_01CC24FE.244C1200--