在tomcat中配置多个域名的多个项目

在tomcat中配置多个域名的多个项目:server.xml中,加以下:
<
Host name="xxx.cc" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">

  < Alias > www.xxx.cc </ Alias >
  < Context path ="" docBase =" xxx " debug =" 0 " reloadable =" true " />
- <!--
 SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html 
  -->
- <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        
  -->
- <!--
 Access log processes all example.
             Documentation at: /docs/config/valve.html 
  -->
- <!--
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"  
               prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
        
  -->
  </ Host >
- < Host name ="yyy .cc " appBase =" webapps " unpackWARs =" true " autoDeploy =" true " xmlValidation =" false " xmlNamespaceAware =" false ">
  < Alias > www.yyy.cc </ Alias >
  < Context path ="" docBase =" yyy " debug =" 0 " reloadable =" true " />
- <!--
 SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html 
  -->
- <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        
  -->
- <!--
 Access log processes all example.
             Documentation at: /docs/config/valve.html 
  -->
- <!--
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"  
               prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
        
  -->
  </ Host >

你可能感兴趣的:(tomcat)