当前位置: 代码迷 >> Web前端 >> tomcat 依据 请求 域名 访问不同webapps 目录
  详细解决方案

tomcat 依据 请求 域名 访问不同webapps 目录

热度:471   发布时间:2012-09-23 10:28:11.0
tomcat 根据 请求 域名 访问不同webapps 目录

在tomcat/conf/server.xml中

<Host name="testw.xxx.cn"  appBase="webapps/www"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
        <Context path="" docBase="" debug="0" reloadable="false" >
        </Context>
      </Host>
	  <Host name="testb.xxx.cn"  appBase="webapps/bbb"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
        <Context path="" docBase="" debug="0" reloadable="false" >
        </Context>
      </Host>
?
  相关解决方案