tomcat域名的配置

方式一绝对路径配法
<Host name="xxx.com.cn" appBase="E:\www\xxx\web_new1" debug="0" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
   <Alias>www.xxx.com.cn</Alias>
        <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="xxx_log." suffix=".txt"
            timestamp="true"/>
           
       </Host>

方式二虚拟路径配法
<Host name="xxxx.com.cn" debug="0" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
        <Context path="/" docBase="E:\wwwroot\xxxx\web" reloadable="true"  workDir="E:\wwwroot\xxxx\j2src"/>
        <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="xxxx_log." suffix=".txt"
            timestamp="true"/>
           
</Host>

你可能感兴趣的:(tomcat)