zoukankan      html  css  js  c++  java
  • tomcat一个端口配置多个项目

    在server.xml中增加host节点

    <Host name="localhost"  appBase="webapps"   <!--这是默认的--->
                unpackWARs="true" autoDeploy="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
                 Note: The pattern used is equivalent to using pattern="common" -->
            <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
                   prefix="localhost_access_log" suffix=".txt"
                   pattern="%h %l %u %t &quot;%r&quot; %s %b" />
    
          </Host>
    
         <Host name="sin2x.com" appBase="/data/www/apps/sin2x"    <!--C盘host文件需要添加解析到 'sin2x.com' --->
                unpackWARs="true" autoDeploy="true">
            <Context path="" docBase="ROOT" reloadable="true"/>   <!--docBase可以写绝对路径,即已‘/’开头,不写绝对路径则从appBase路径开始算--->
    
                <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
                            prefix="sin2x.com_access_log" suffix=".txt"   <!--指定日志-->
                            pattern="%h %l %u %t &quot;%r&quot; %s %b" />
          </Host>
  • 相关阅读:
    Mobile phones(poj1195)
    Matrix(poj2155)
    1080
    1266
    codeforces626D . Jerry's Protest
    字符串格式化
    附加MySQL数据库的方法
    avaScript中变量的声明和赋值
    选择法排序
    JavaScript中变量的类型
  • 原文地址:https://www.cnblogs.com/oyx305/p/6733887.html
Copyright © 2011-2022 走看看