linux环境tomcat多域名指向多项目server xml配置

博客分类: tomcat 阅读次数: comments

linux环境tomcat多域名指向多项目server xml配置

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
    <Engine name="Catalina" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>
      <Host name="www.edujoy.com.cn"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="edujoy_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
	<Context docBase="//root/tomcat/webapps/ROOT/support" path="/support" reloadable="true" />
      </Host>
      <Host name="kefuzhongxin" appBase="/data/support" unpackWARs="true"
	    autoDeploy="true">
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="kefuzhongxin_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

      </Host>
      <!-- 域名 tangtest.edujoy.com.cn -->
            <Host name="tangtest.edujoy.com.cn"  appBase="tangtest"
            unpackWARs="true" autoDeploy="true">
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="tangtest_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
	<Context docBase="//root/tomcat/tangtest/ROOT/" path="" reloadable="true" />
      </Host>
        <!-- 域名  learntest.edujoy.com.cn/-->
              <Host name="learntest.edujoy.com.cn"  appBase="learn"
            unpackWARs="true" autoDeploy="true">
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="learntest_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
	<Context docBase="//root/tomcat/learn/" path="" reloadable="true" />
    </Engine>
  </Service>
</Server>