tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Durfee, Bernard" <Bernard.Dur...@suny.edu>
Subject Tomcat 5.5 Virtual Hosting
Date Fri, 16 Sep 2005 21:25:34 GMT
Okay, after much struggle here is the solution I came up with for
virtual hosting...

1 Machine, 3 DNS Entries - mymachine.me.com, app01.me.com, app02.me.com

==========================================
server.xml - 3 host entries under the Catalina engine:

  <Host name="localhost"
            appBase="webapps"
            unpackWARs="true"
            autoDeploy="true"
            xmlValidation="false"
            xmlNamespaceAware="false">
      </Host>

  <Host name="app01.me.com"
            appBase="webapps-app01.me.com"
            unpackWARs="true"
            autoDeploy="true"
            xmlValidation="false"
            xmlNamespaceAware="false">
      </Host>

  <Host name="app02.me.com"
            appBase="webapps-app02.me.com"
            unpackWARs="true"
            autoDeploy="true"
            xmlValidation="false"
            xmlNamespaceAware="false">
      </Host>

Notice each host has a separate appBase.
==========================================

==========================================
Create directories for host contexts:
[TOMCAT]/conf/Catalina/app01.me.com
[TOMCAT]/conf/Catalina/app02.me.com

These are the directories that Tomcat will look in to figure out how to
process incoming URLs.

Copy manager.xml from [TOMCAT]/conf/Catalina/localhost to both of these
new directories. This allows you to use the manager to deploy into each
host.
==========================================

==========================================
Start Tomcat, browse to app01.me.com/manager/html, which will bring up
the manager for app01.me.com.

Deploy your application, make sure the WAR file is named with the
context you want. To deploy to the root context you need to name the
WAR: ROOT.war, with 'root' all caps.
==========================================

Bernie


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message