Dear, List, I have several websites and each site is a web application.
If i wanna hosting all the sites in a single tomcat instance, i have to add several "<Host>" elements in server.xml. In the default <Host> which coming with the tomcat packages, the appBase is "webapps" which located in CATALINA_BASE. Each directory in it is a web applications. And there is also a ROOT directory which hosted all the related documents. The <Context> element of the ROOT directory is: <Context path="/" docBase="ROOT" debug="0" privileged="true" allowLinking="true"> </Context> So the directory tree should be webapps-ROOT -webapp1 -webapp2 - ... But now, all of my sites are only single web application. So i configure the Virtualhost in server.xml like <Host className="org.apache.catalina.core.StandardHost" appBase="/home/www/site1" autoDeploy="false" configClass="org.a pache.catalina.startup.ContextConfig" contextClass=" org.apache.catalina.core.StandardContext" debug="0" deployXML="true" errorReport ValveClass="org.apache.catalina.valves.ErrorReportValve" liveDeploy="true" mapperClass="org.apache.catalina.core.StandardHostMapper" name="site1.example.com" unpackWARs="true"> <Context path="" docBase="/home/www/site1" reloadable="true" debug="0"/> </Host> <Host className="org.apache.catalina.core.StandardHost" appBase="/home/www/site2" autoDeploy="false" configClass="org.a pache.catalina.startup.ContextConfig" contextClass=" org.apache.catalina.core.StandardContext" debug="0" deployXML="true" errorReport ValveClass="org.apache.catalina.valves.ErrorReportValve" liveDeploy="true" mapperClass="org.apache.catalina.core.StandardHostMapper" name="site2.example.com" unpackWARs="true"> <Context path="" docBase="/home/www/site2" reloadable="true" debug="0"/> </Host> The appBase and docBase in the same virtualhost have the same path value. It seems workable. But i am not sure the configuration right or not. Could someone could pick me up? Thanks in advacne. Penghui Wang -- Wang Penghui http://www.extmail.org http://www.postfix.org.cn