tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kennedy" <>
Subject Multiple hosts pointing to different index files for one webapp
Date Tue, 07 Jun 2011 15:32:03 GMT
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: --> webapps/portalapp/portal1_index.jsp --> 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 <Host> or 'path' and 'docBase' under <Context> 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


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 ( won't work,
have to use


from server.xml:

<Host name="" appBase="webapps/portal"

       unpackWARs="true" autoDeploy="true"

       xmlValidation="false" xmlNamespaceAware="false">

       <Context path="" docBase="."

       debug="0" reloadable="false"/>



from httpd.conf:


<VirtualHost ipaddr:80>

DocumentRoot /var/www/html/portal1


<Directory "/var/www/html/portal1/">

allow from all

Options -Indexes


DirectoryIndex portal1_index.jsp

# Added to proxy for Tomcat

ProxyRequests Off

<Proxy *>

Order deny,allow

Allow from all


ProxyPass /

ProxyPassReverse /

ProxyVia On

ProxyPreserveHost Off



Again, many thanks for your consideration.



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message