Tomcat多个应用配置方法

   2015-06-28 0
核心提示:Tomcat 多个应用配置方法,需要的朋友可以参考下。
复制代码 代码如下:

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

<!--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" />
<!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

<!-- 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 HTTP/1.1 Connector on port 8080
-->
<Connector server="mws" address="127.0.0.1" port="80" maxHttpHeaderSize="8192" maxThreads="1024"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"
compression="on" compressableMimeType="text/html,text/xml,text/plain" bufferSize="10240" URIEncoding="GBK"/>
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->

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

<!-- The request dumper valve dumps useful debugging information about
the request and response data received and sent by Tomcat.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->

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

<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="news.sososteel.com" appBase=""
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="/export/wwwroot/news.sososteel.com" debug="0">
</Context>
</Host>
<Host name="market.sososteel.com" appBase=""
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="/export/wwwroot/market.sososteel.com" debug="0">
</Context>
</Host>
<Host name="baike.sososteel.com" appBase=""
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="/export/wwwroot/baike.sososteel.com" debug="0">
</Context>
</Host>
<Host name="www.sososteel.com" appBase=""
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="/export/wwwroot/www.sososteel.com" debug="0">
</Context>
</Host>
<Host name="user.service.sososteel.com" appBase=""
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="/export/wwwroot/user.service.sososteel.com" debug="0">
</Context>
</Host>
<Host name="www.steelphone.com" appBase=""
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="/export/wwwroot/www.steelphone.com" debug="0">
</Context>
</Host>

</Engine>
</Service>
</Server>
 
标签: Tomcat 多个应用
反对 0举报 0 评论 0
 

免责声明:本文仅代表作者个人观点,与乐学笔记(本网)无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
    本网站有部分内容均转载自其它媒体,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责,若因作品内容、知识产权、版权和其他问题,请及时提供相关证明等材料并与我们留言联系,本网站将在规定时间内给予删除等相关处理.

  • 装tomcat和nginx心得
    开机启动tomcat1:在/etc/rc.d/init.d目录下生成一个文件tomcat80802:在文件里添加如下内#!/bin/bash#2345 linux运行级别#10开机启动优先级,数值越大越排在前面,最大值100#90关机优先级#chkconfig:2345 10 90#description: tomcat8080 start....start(){ec
    02-13
  • apache2 tomcat https配置-被忽悠进了CentOS 6
      因为需要让ios应用可以绕过appstore,要找个https的地方放ipa,决定使用已有http server。  首先需要说明的是,apache可以通过反向代理方式将用户的https分发到tomcat的http上,因此只需要配置apache的https即可。但我这里还是把两个服务器的https都配
    02-10
  • Apache Tomcat 之路(二 部署web 应用程序)
    Apache Tomcat 之路(二 部署web 应用程序)
    1.创建一个webapplication,不论是解压的应用程序包还是war包,在tomcat 上都能部署,这里提供一个简单的web项目:git地址:https://github.com/coderxiao2015/springmvcmaven.git 2.配置conf 文件夹下的server.xml ,这个文件是tomcat 部署的核心文件  a).
    02-10
  • windows下apache tomcat整合
    准备工作:1、 httpd-2.2.22-win32-x86-openssl-0.9.8t.msi下载地址:http://apache.etoak.com//httpd/binaries/win32/httpd-2.2.22-win32-x86-openssl-0.9.8t.msi2、 apache-tomcat-6.0.20.zip(免安装版-绿色版)下载地址:http://archive.apache.org/dist/
    02-10
  • Eclipse添加tomcat出现 The Apache Tomcat ins
    打开tomcat安装目录:apache-tomcat-8.5.6\lib 找到catalina.jar用解压缩工具打开 org/apache/catalina/util/ServerInfo.properties将:     server.info=Apache Tomcat/8.5.6  server.number=8.5.6.0  server.built=Oct 6 2016 20:15:31 UTC改为:
    02-10
  • An incompatible version [1.2.10] of the APR
     这个链接的博主写的很详细,直接推荐:https://blog.csdn.net/zhoukikoo/article/details/80532483
    02-10
  • tomcat启动提示java.lang.UnsatisfiedLinkError
    https://blog.csdn.net/a274360781/article/details/52411984
    02-10
  • 【漏洞预警】Apache Tomcat Session 反序列化代
    Tomcat Session 漏洞https://blog.csdn.net/xia296/article/details/106249137/ 漏洞描述影响版本安全版本安全建议操作步骤下载你要升级的Tomcat 10.0.0-M5版本:备份旧的tomcat(这部分非必须,根据自己情况而定)开始安装新版本禁止使用Session持久化功能F
    02-10
  • 结合Apache和Tomcat实现集群和负载均衡 JK 方式 2 (转)
    结合Apache和Tomcat实现集群和负载均衡 JK 方式
    本文Apache+Tomcat集群配置       基于最新的Apache和Tomcat,具体是2011年4月20日最新的Tomcat和Apache集群和负载均衡配置。准备环境ApacheApache是http服务器,我们利用其对Tomcat进行负载均衡。目前最新版本为2.2.17,下载地址为http://httpd.apache
    02-10
  • Class 'org.apache.tomcat.jdbc.pool.DataSource' not   found
    Class 'org.apache.tomcat.jdbc.pool.Data
      把项目移动到新的运行环境时,明明包都导入了,项目也放进tomcat里面了,但是还会找不到该类解决方法:项目右键选择底下的Properties -project facets -java 把Runtimes里面的Apache Tomcat的勾打上  这样才算把tomcat放进类路径里面
    02-10
点击排行