• Windows系统下面同时起两个服务


    有个需求需要同时在一个机子上面起两个服务。操作如下:

    (1)  需要把页面中涉及的端口改成和另一个Server不一致的服务,这样就可以了。

    <?xml version='1.0' encoding='utf-8'?>
    <Server port="8085" shutdown="SHUTDOWN">
      <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
      <Listener className="org.apache.catalina.core.JasperListener" />
      <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
      <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

      <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="8099" protocol="HTTP/1.1"
                   connectionTimeout="20000"  maxPostSize="16777216"
                   redirectPort="8483" />
        <Connector port="8089" protocol="AJP/1.3" redirectPort="8483" />

        <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>
    </Server>

    (2)

    <?xml version='1.0' encoding='utf-8'?>
    <Server port="8086" shutdown="SHUTDOWN">
      <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
      <Listener className="org.apache.catalina.core.JasperListener" />
      <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
      <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

      <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="9001" protocol="HTTP/1.1"
                   connectionTimeout="20000"  maxPostSize="16777216"
                   redirectPort="8484" />
        <Connector port="9002" protocol="AJP/1.3" redirectPort="8484" />

        <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>
    </Server>

  • 相关阅读:
    黄聪:WordPress 启用HTTPS设置(转)
    黄聪:实用WordPress SQL查询方法
    ArcGIS Pro二次开发,定制开发,参考资料
    ArcGIS Pro二次开发--数据库篇
    ArcGIS Pro二次开发-插入文本,图例和指北针
    ArcGIS Pro二次开发地图MapSeries序列设置
    ArcGIS Pro二次开发-获得Objectid字段
    ArcGIS Pro定制和开发-执行GP环境变量的设置
    ArcGIS Pro二次开发-图层标注
    ArcGIS Pro二次开发-获得一个要素的字段
  • 原文地址:https://www.cnblogs.com/zhangzhifeng/p/2279378.html
Copyright © 2020-2023  润新知