• tomcat7部署多个web应用不同编码,端口


    1个tomcat部署多个web应用可以设置不同编码,端口,server.xml配置如下:

    <?xml version='1.0' encoding='utf-8'?>
    <Server port="8014" shutdown="SHUTDOWN">  
       <!--APR library loader. Documentation at /docs/apr.html -->
      <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
      <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
      <Listener className="org.apache.catalina.core.JasperListener" />
      <!-- Prevent memory leaks due to use of particular java/javax APIs-->
      <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
      <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />


      <GlobalNamingResources>

        <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="9091" protocol="HTTP/1.1"
                   connectionTimeout="60000" maxThreads="450" redirectPort="8443" URIEncoding="UTF-8"/>
        
        <Connector port="18014" 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"
                xmlValidation="false" xmlNamespaceAware="false">      
                <Context path="" docBase="D:cjktest omcat71webappscgplatform" reloadable="true" />
          </Host>
        </Engine>
      </Service>

      <Service name="Catalina1">

        <Connector port="9092" protocol="HTTP/1.1"
                   connectionTimeout="60000" maxThreads="450" redirectPort="8443" URIEncoding="UTF-8"/>
        
        <Connector port="28014" 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"
                xmlValidation="false" xmlNamespaceAware="false">      
                <Context path="" docBase="D:cjktest omcat71webappscgcoms" reloadable="true" />
          </Host>

    <!--

          <Host name="passport.caibab.com"  appBase="/home/software/tomcat_cas"
                unpackWARs="true" autoDeploy="true">            
                <Context path="" docBase="/home/software/tomcat_cas/webapps/cgcas" reloadable="true" />
          </Host>

    -->
        </Engine>
      </Service>
      
    </Server>

  • 相关阅读:
    nginx 报错 upstream timed out (110: Connection timed out)解决方案
    mysql 数据库缓存调优之解决The total number of locks exceeds the lock table size错误
    阿里云ECS主机内核调优
    安装Python3.6.x
    CentOS 下 LNMP 环境配置
    Walle代码发布系统
    Ansible 运维自动化 ( 配置管理工具 )
    Kafka消息的时间戳
    Linux内存分析
    H3C 查看路由器的硬件信息
  • 原文地址:https://www.cnblogs.com/ruiati/p/6943909.html
Copyright © 2020-2023  润新知