Forum Moderators: phranque

Message Too Old, No Replies

Apache Tomcat configuration - Secondary Domain

How do I configure a secondary domain on Apache Tomcat

         

zuko105

5:16 am on Feb 6, 2004 (gmt 0)

10+ Year Member



Just curious if anyone can help out a novice on tomcat configuration.
I am trying to setup a simple secondary domain that will use request headers from the browser client to identify which directory it will use to server files from.

I remember in apache it was only a few lines of definitions. "virtual host" I think it was.

Anyways, any help would be well appreciated.

(Oh yeah, I'm using tomcat stand alone)

Thanks in advance.

Zuko

zuko105

5:26 am on Feb 6, 2004 (gmt 0)

10+ Year Member



Nevermind,
Sorted it out.

Here is what I found in case anyone else needs the same info:

in CATALINA_HOME/conf/server.xml

<Host name="mydomain0.com" debug="0" appBase="webapps" unpackWARs="true">
<Alias>www.mydomain0.com</Alias>
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="mydomain0." suffix=".log" timestamp="true"/>
<Context path="" docBase="mydomain0" debug="0" reloadable="true"/>
<Context path="/test" docBase="mydomain0" debug="0" reloadable="true"/>
</Host>
<Host name="mydomain1.com" debug="0" appBase="webapps" unpackWARs="true">
<Alias>www.mydomain1.com</Alias>
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="mydomain1." suffix=".log" timestamp="true"/>
<Context path="" docBase="mydomain1" debug="0" reloadable="true"/>
<Context path="/test" docBase="mydomain1" debug="0" reloadable="true"/>
</Host>
<Host name="mydomain2.com" debug="0" appBase="webapps" unpackWARs="true">
<Alias>www.mydomain2.com</Alias>
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="mydomain2." suffix=".log" timestamp="true"/>
<Context path="" docBase="mydomain2" debug="0" reloadable="true"/>
<Context path="/test" docBase="mydomain2" debug="0" reloadable="true"/>
</Host>