• tomcat 一个服务 多端口网站


    多站点多端口

      <Service name="Catalina">

         <Connector port="8080" protocol="HTTP/1.1"  connectionTimeout="20000"  redirectPort="8443" />

         <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="localhost"  appBase="webapps"
                unpackWARs="true" autoDeploy="true">        
                 <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>
        </Engine>
      </Service>
     
     

    复制上面一份, 做为新的端口网站    

    <Service name="Catalina8100">
            <Connector port="8100" protocol="HTTP/1.1"
                       connectionTimeout="20000"
                       redirectPort="8443" />

            <Connector port="8099" protocol="AJP/1.3" redirectPort="8443" />

            <Engine name="Catalina8100" defaultHost="localhost">   
                <Realm className="org.apache.catalina.realm.LockOutRealm">
                    <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                           resourceName="UserDatabase"/>
                </Realm>

                <Host name="localhost"  appBase="webapps8100"
                        unpackWARs="true" autoDeploy="true">
                   
                    <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>
            </Engine>
        </Service>

    单站点多端口

    <Service name="Catalina">  

        <Connector port="8080" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8443" />
                  
       <Connector port="9090" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8443" />
       <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="localhost"  appBase="webapps"
                unpackWARs="true" autoDeploy="true">

                 <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>      
        </Engine>
      </Service>

  • 相关阅读:
    对于在git上面拉代码报"error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054"解决方法
    在vue项目中如何添加eslint
    vscode编辑如何保存时自动校准eslint规范
    css3动画
    JS中的深拷贝与浅拷贝
    JS中的防抖与节流
    金三银四求职季,前端面试题小梳理(HTML、CSS、JS)
    正则表达式元字符大整理
    常规正则表达式练习,一起来开心的掉发吧
    关于子元素的margin-top对父级容器无效
  • 原文地址:https://www.cnblogs.com/chencidi/p/4533964.html
Copyright © 2020-2023  润新知