Forum Moderators: phranque
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 standalone version of Tomcat 5.x.
Thanks in advance.
Zuko
Here is an example of what I found:
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>