• tomcat多个端口对应多个web应用


    <?xml version='1.0' encoding='utf-8'?>
    
    <Server port="8005" shutdown="SHUTDOWN">
    
        <Resource name="UserDatabase" auth="Container"
                  type="org.apache.catalina.UserDatabase"
                  description="User database that can be updated and saved"
                  factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
                  pathname="conf/tomcat-users.xml" />
      </GlobalNamingResources>
    
      <Service name="Catalina">
        <Connector port="7777" 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.UserDatabaseRealm"
                 resourceName="UserDatabase"/>
          <Host name="localhost"  appBase="webapps"
                unpackWARs="true" autoDeploy="true"
                xmlValidation="false" xmlNamespaceAware="false">
          </Host>
        </Engine>
      </Service>
      
       <Service name="Catalina2">
        <Connector port="8002" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8444"/>
        <Connector port="8010" protocol="AJP/1.3" redirectPort="8444" URIEncoding="UTF-8" />
    
        <Engine name="Catalina2" defaultHost="localhost">
          <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                 resourceName="UserDatabase"/>
          <Host name="localhost"  appBase="webapps"
                unpackWARs="true" autoDeploy="true"
                xmlValidation="false" xmlNamespaceAware="false">
                <Context path=""  docBase="system" />
                 
          </Host>
        </Engine>
      </Service>
    
    </Server>

    重新复制一个service,改掉名字,端口,如上,测试成功。

    还有一点需要数以的是:<Context path="" docBase="system" />

    path不填就可以实现直接打入网址和端口就可以进入system引用啦。

  • 相关阅读:
    sql 触发器
    索引使用原则
    索引原理
    索引
    wpf Datagrid 的全选
    WPF ChangePropertyAction中TargetName和TargetObject的区别
    mvvm 模板中事件没有执行的解决方案
    wpf窗口禁止最大化但允许调整大小
    Process打开文件
    installshield 6109错误解决方案
  • 原文地址:https://www.cnblogs.com/killbug/p/2872473.html
Copyright © 2020-2023  润新知