美文网首页
多开Tomcat,以及Tomcat把服务器上的硬盘路径映射成虚拟

多开Tomcat,以及Tomcat把服务器上的硬盘路径映射成虚拟

作者: 奇乞祈兴 | 来源:发表于2017-05-05 16:06 被阅读0次

    以下我们来配一个8081tomcat

    <!-- A "Connector" represents an endpoint by which requests are received
             and responses are returned. Documentation at :
             Java HTTP Connector: /docs/config/http.html
             Java AJP  Connector: /docs/config/ajp.html
             APR (HTTP/AJP) Connector: /docs/apr.html
             Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
        -->
        <Connector port="8081" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8444" />
    
    <!-- Define an AJP 1.3 Connector on port 8009 -->
        <Connector port="8010" protocol="AJP/1.3" redirectPort="8444" />
    
    如果想把服务器上的硬盘路径映射成虚拟路径,需要在<Host>里面配<Context>
    <Host name="localhost"  appBase="webapps"
                unpackWARs="true" autoDeploy="true">
                
                <Context path="/files" docBase="D:\wechat\files" reloadable="true" debug="0"></Context>
                <Context path="/images" docBase="D:\wechat\images" reloadable="true" debug="0"></Context>
    
            <!-- 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>
    

    相关文章

      网友评论

          本文标题:多开Tomcat,以及Tomcat把服务器上的硬盘路径映射成虚拟

          本文链接:https://www.haomeiwen.com/subject/yktstxtx.html