文档章节

tomcat多端口多路径配置

往事已成风
 往事已成风
发布于 2016/04/14 17:38
字数 840
阅读 65
收藏 0
点赞 1
评论 0

废话不多说,直接贴配置文件

<?xml version='1.0' encoding='utf-8'?>

<!--

  Licensed to the Apache Software Foundation (ASF) under one or more

  contributor license agreements.  See the NOTICE file distributed with

  this work for additional information regarding copyright ownership.

  The ASF licenses this file to You under the Apache License, Version 2.0

  (the "License"); you may not use this file except in compliance with

  the License.  You may obtain a copy of the License at


      http://www.apache.org/licenses/LICENSE-2.0


  Unless required by applicable law or agreed to in writing, software

  distributed under the License is distributed on an "AS IS" BASIS,

  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  See the License for the specific language governing permissions and

  limitations under the License.

-->

<!-- Note:  A "Server" is not itself a "Container", so you may not

     define subcomponents such as "Valves" at this level.

     Documentation at /docs/config/server.html

 -->

<Server port="8005" shutdown="SHUTDOWN">

  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />

  <!-- Security listener. Documentation at /docs/config/listeners.html

  <Listener className="org.apache.catalina.security.SecurityListener" />

  -->

  <!--APR library loader. Documentation at /docs/apr.html -->

  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />

  <!-- 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" />


  <!-- Global JNDI resources

       Documentation at /docs/jndi-resources-howto.html

  -->

  <GlobalNamingResources>

    <!-- Editable user database that can also be used by

         UserDatabaseRealm to authenticate users

    -->

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


  <!-- A "Service" is a collection of one or more "Connectors" that share

       a single "Container" Note:  A "Service" is not itself a "Container",

       so you may not define subcomponents such as "Valves" at this level.

       Documentation at /docs/config/service.html

   -->

  <Service name="Catalina">


    <!--The connectors can use a shared executor, you can define one or more named thread pools-->

    <!--

    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"

        maxThreads="150" minSpareThreads="4"/>

    -->



    <!-- A "Connector" represents an endpoint by which requests are received

         and responses are returned. Documentation at :

         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)

         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="8080" protocol="HTTP/1.1"

               connectionTimeout="20000"

               redirectPort="8443" />

    <!-- A "Connector" using the shared thread pool-->

    <!--

    <Connector executor="tomcatThreadPool"

               port="8080" protocol="HTTP/1.1"

               connectionTimeout="20000"

               redirectPort="8443" />

    -->

    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443

         This connector uses the NIO implementation that requires the JSSE

         style configuration. When using the APR/native implementation, the

         OpenSSL style configuration is required as described in the APR/native

         documentation -->

    <!--

    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"

               maxThreads="150" SSLEnabled="true" scheme="https" secure="true"

               clientAuth="false" sslProtocol="TLS" />

    -->


    <!-- Define an AJP 1.3 Connector on port 8009 -->

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



    <!-- An Engine represents the entry point (within Catalina) that processes

         every request.  The Engine implementation for Tomcat stand alone

         analyzes the HTTP headers included with the request, and passes them

         on to the appropriate Host (virtual host).

         Documentation at /docs/config/engine.html -->


    <!-- You should set jvmRoute to support load-balancing via AJP ie :

    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">

    -->

    <Engine name="Catalina" defaultHost="localhost">


      <!--For clustering, please take a look at documentation at:

          /docs/cluster-howto.html  (simple how to)

          /docs/config/cluster.html (reference documentation) -->

      <!--

      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>

      -->


      <!-- Use the LockOutRealm to prevent attempts to guess user passwords

           via a brute-force attack -->

      <Realm className="org.apache.catalina.realm.LockOutRealm">

        <!-- This Realm uses the UserDatabase configured in the global JNDI

             resources under the key "UserDatabase".  Any edits

             that are performed against this UserDatabase are immediately

             available for use by the Realm.  -->

        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"

               resourceName="UserDatabase"/>

      </Realm>


      <Host name="localhost"  appBase="webapps"

            unpackWARs="true" autoDeploy="true">


        <!-- 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" />


        <!-- 配置不输入项目名就可以访问项目 -->

        <Context path="/"

    docBase="D:\maven\workspace\apache-tomcat-8.0.29\webapps\eova" reloadable="true">

         </Context>


      </Host>


    </Engine>

  </Service>


  <Service name="Catalina2">

      <!-- 指定端口 -->

      <Connector port="8090" protocol="HTTP/1.1"

               connectionTimeout="20000"

               redirectPort="8443" />

       <Connector port="8099" 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="192.168.2.61"  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" />

        <!-- 

    配置图片上传路径 

    配置后图片的访问路径为:http://192.168.2.61:8090/image/bucao/xxx.png

-->

        <Context path="/image/bucao"

    docBase="D:\Codeing\static\image\bucao" 

>

         </Context>

      </Host>


    </Engine>

  </Service>

</Server>


© 著作权归作者所有

共有 人打赏支持
往事已成风
粉丝 1
博文 3
码字总数 2905
作品 0
深圳
程序员
Rhel Linux multipath + OpenfIler raid iscsi

前段时间学习了关于Redhat Linux上的多路径Multipath,以及为了方便学习在本机电脑上安装了Openfiler模拟存储,配置多块网卡实现多路径冗余识别存储。在这里以我个人的理解简单的描述我所认知...

Sound_ ⋅ 2017/06/09 ⋅ 0

Linux存储在线管理(一)FC磁盘设备管理

转自EMC中文支持论坛 – https://community.emc.com/go/chinese 介绍 本文主要介绍Linux环境下FC磁盘管理相关只是,主要内容包括FC驱动介绍、Linux SCSI磁盘永久命名、FC磁盘添加与删除、FC磁...

476069017 ⋅ 2017/04/21 ⋅ 0

请问freemarker如何设置多路径?

请问freemarker如何设置多路径? 在eclipse里面建2个项目,1个放主程序,1个放模板资源 用tomcat启动同时加载这2个项目 项目启动成功后能够正常访问模板资源的内容 附图 主程序访问成功。 子...

盈盈520 ⋅ 2015/07/31 ⋅ 3

CentOS7 DM-Multipath+HUAWEI OceanStor存储多路径配置

在参看了网上他人的配置,结合RedHat的技术白皮书实现后,自己亲身在CentOS7+HUAWEI OceanStore S2600T的基础上配置了一个DM-Multipath存储多路径的实现,其中碰到了一些小问题和不明白的地方...

t_huanghai ⋅ 2016/07/05 ⋅ 0

asmlib方式管理oracle asm环境下,新加存储需特别注意

oracle10g 数据库主机已经连接有使用RDAC的存储,计划新增扩容IBM新存储(要求使用dm-multipath多路径软件),多个多路径软件能否共存?启后sd设备名是否会发生改变,是否影响asm和oracle启动...

liu99fifa ⋅ 2015/12/31 ⋅ 0

tomcat实现多端口、多域名访问

tomcat可以实现:多个端口访问同一个web应用、不同的应用通过不同的域名进行访问。 本文介绍的都是只启动一个tomcat服务的情况下,当然,实现这些功能也可以通过启动多个tomcat服务实现。 百...

尉迟逍遥 ⋅ 2015/10/10 ⋅ 0

Windows下挂载iscsi存储及多路径功能配置

环境:windows server 2008 R2 IP1:10.0.0.111 IP2:10.0.0.112 EQ ip:10.0.0.10 windows2008自带MPIO(多链路)和ISCSI客户端通过2块网卡实现ISCSI存储负载均衡,ISCSI默认安装好了,MPIO需要...

justin_peng ⋅ 2017/04/15 ⋅ 0

linux下磁盘多路径

有时我们在linux系统 中通过"fdisk-l"命令,会看到/dev/mapper/xxxxx的磁盘,这中磁盘有可能是逻辑卷,也有可能是配置的多路径,可以先通过“lvdisplay”如何能查看到,则说明是逻辑卷,如果...

qbs1989 ⋅ 2017/04/28 ⋅ 0

windows使用DS4000空间

一、任务:Pc server(win2008 64bit)要连DS4300(SM 10.15即可管理) 二、需要提前了解和准备的内容: 1、操作系统类型、版本、补丁集、位数 2、光纤卡类型、驱动安装 3、存储微码版本、适用...

liu99fifa ⋅ 2011/12/27 ⋅ 0

使用Nginx实现多个tomcat的负载运行及Session共享的教程

一.Nginx实现多Tomat负载配置 1.下载Nginx,修改Nginx的配置文件nginx.conf (1) 配置nginx的upstream 2.下载tomcat安装包,分别部署的结构截图: (1) 修改tomcat 的相关8080端口配置/conf/s...

CapJes ⋅ 2016/05/25 ⋅ 3

没有更多内容

加载失败,请刷新页面

加载更多

下一页

MySQL主从复制原理、半同步操作步骤及原理

1.1 企业Linux运维场景数据同步方案 1.1.1 文件级别的异机同步方案 1、scp/sftp/nc 命令可以实现远程数据同步。 2、搭建ftp/http/svn/nfs 服务器,然后在客户端上也可以把数据同步到服务器。...

xiaomin0322 ⋅ 21分钟前 ⋅ 0

Oracle10g 数据及文件迁移过程[原]

QL*Plus: Release 10.2.0.1.0 - Production on 星期三 5月 11 10:22:35 2011 Copyright (c) 1982, 2005, Oracle. All rights reserved. 连接到: Oracle Database 10g Enterprise Edition Re......

harrypotter ⋅ 27分钟前 ⋅ 0

nginx安装

1:安装工具包 wget、vim和gcc yum install -y wget yum install -y vim-enhanced yum install -y make cmake gcc gcc-c++ 2:下载nginx安装包 wget http://nginx.org/download/nginx-1......

壹丶贰 ⋅ 30分钟前 ⋅ 0

ideaVim安装及配置

1.安装插件 File-Settings-Plugins,Browse Repositories,输入ideavim,安装。 重启后,在Tools-Vim Emulator启用。 2.快捷键设置 ideaViim键与idea快捷键有冲突,可以在Settings-Other Se...

Funcy1122 ⋅ 34分钟前 ⋅ 0

MySQL中B+Tree索引原理

B+树索引是B+树在数据库中的一种实现,是最常见也是数据库中使用最为频繁的一种索引。B+树中的B代表平衡(balance),而不是二叉(binary),因为B+树是从最早的平衡二叉树演化而来的。在讲B...

浮躁的码农 ⋅ 48分钟前 ⋅ 0

两道面试题,带你解析Java类加载机制

在许多Java面试中,我们经常会看到关于Java类加载机制的考察,例如下面这道题: class Grandpa{ static { System.out.println("爷爷在静态代码块"); }} cl...

1527 ⋅ 52分钟前 ⋅ 0

SpringCloud(Data Flow)

dataflow-server

赵-猛 ⋅ 今天 ⋅ 0

深入理解Java虚拟机

这本书我读到第8章,之后就是在读不下去了。 读到后面是一种痛苦的体验,太多的东西是不全面的,大量的专有名词是没有解释的,读到最后很多东西仅仅是一个侧面,所以我觉得,这本书不适合初学...

颖伙虫 ⋅ 今天 ⋅ 0

NanoPi NEO core/ Ubuntu16.04单网卡配置3个IP地址(2个静态,1个动态)

配置 root@NanoPi-NEO-Core:/etc/network# cat interfacesauto loiface lo inet loopbackallow-hotplug eth0iface eth0 inet static address 172.31.188.249 netmask 255.......

SamXIAO ⋅ 今天 ⋅ 0

三步为你的App集成LivePhoto功能

摘要:LivePhoto是iOS9新推出的一种拍照方式,类似于拍摄Gif图或录制视频片段生成图片。如果没有画面感,可以联想《哈利波特》霍格沃茨城堡的壁画,哈哈,很炫酷有木有,但坑爹的是只有iphone6S以...

壹峰 ⋅ 今天 ⋅ 0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

返回顶部
顶部