Tomcat 多域名部署多个项目一览:
XML code
<Engine name="Catalina" defaultHost="jsxymgh.3322.org"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> <!--域名1--> <Host name="jsxymgh.3322.org" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <!--默认访问--> <Context path ="" debug="0" docBase ="/test1" reloadable="true" privileged="true"> </Context> </Host> <!--域名2--> <Host name="chinamgh.3322.org" appBase="D:/1" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <!--默认访问--> <Context path ="" debug="0" docBase ="/test2" reloadable="true" privileged="true"> </Context> </Host> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> </Host> </Engine>