<?xml version='1.0' encoding='utf-8'?>
<!--端口:127.0.0.1::7777
  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="8007" shutdown="SHUTDOWN">
  <!-- 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 HTTP/1.1 Connector on port 8080
    -->
    <Connector port="7777" 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 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" />

</Host>
    </Engine>
  </Service>
</Server>

Tomcat配置server.xml相关推荐

  1. Tomcat 服务器server.xml,web.xml的关键参数配置

    Tomcat 服务器server.xml的关键参数配置 说明:以下文字均以tomcat5.0.30为例进行. 1,配置tomcat服务器访问端口,只需配置Connector的port端口即可.Tomc ...

  2. 配置Tomcat的server.xml以适应web-content文件系统的位置改变

    刚才把写的一对jsp.html文件夹改变了位置,然后测试的时候出现了404 后来思考,应该去重新配置tomcat的server.xml文件,修改虚拟路径对应的文件系统路径,修改为当前对应的文件系统路径 ...

  3. Java读取和修改Tomcat的server.xml配置文件(多个service配置适用)

    1.读取工具类 public static Document getXMLAttribute(String filepath, String nodeName){Document document = ...

  4. Tomcat(二):tomcat配置文件server.xml详解和部署简介

    1. 入门示例:虚拟主机提供web服务 该示例通过设置虚拟主机来提供web服务,因为是入门示例,所以设置极其简单,只需修改$CATALINA_HOME/conf/server.xml文件为如下内容即可 ...

  5. 详解Tomcat 配置文件server.xml

    1. 详解Tomcat 配置文件server.xml https://www.cnblogs.com/kismetv/p/7228274.html 2.Tomcat下Server.xml配置详解 ht ...

  6. 记录Tomcat配置context.xml自动缓存问题

    记录Tomcat配置context.xml自动缓存问题 最近遇到一个tomcat的缓存问题,首先是这样的,我改了一个jsp页面代码,然后部署到tomcat,再访问nginx链接,发现代码都没起效,好像 ...

  7. 本机tomcat的server.xml被还原的问题及解决办法

    将tomcat的server.xml进行修改,但当eclipse发布站点后,发布tomcat中的server.xml会被还原. 原因是eclipse会将自己的tomcat配置文件对tomcat覆盖,解 ...

  8. 转!!配置Tomcat时server.xml和content.xml自动还原问题

    原博文地址:http://www.cnblogs.com/zuosl/p/4342190.html 当我们在处理中文乱码或是配置数据源时,我们要修改Tomcat下的server.xml和content ...

  9. Tomcat在server.xml中配置虚拟目录

    首先,在D盘中新建文件chapter02,然后,在chapter02目录下,新建文件welcome.xml 此时,直接访问是访问不到的 启动Tomcat服务器,在浏览器地址栏中输入 http://lo ...

最新文章

  1. python删除空文件夹
  2. 彻底弄懂 HTTP 缓存机制 —— 基于缓存策略三要素分解法
  3. java arraystoreexception_208道高频 Java面试题答案6
  4. mysql中的sql_mysql中的sql语句
  5. 32位 shell.efi x86_Ubuntu 20.04 LTS或不再支持32位x86 (i386)
  6. [Python人工智能] 二.theano实现回归神经网络分析
  7. python常见模块命令(os/sys/platform)
  8. BZOJ 1016--[JSOI2008]最小生成树计数(kruskal搜索)
  9. CityEngine如何生成隧道
  10. CentOS7下MySQL5.7的安装
  11. 歪枣网股票数据下载接口汇总一
  12. java乱码解决方法
  13. Yum未完成事务问题
  14. MIT 6.824 学习笔记(一)--- RPC 详解
  15. caffe 使用笔记
  16. Apache使用总结
  17. 关于Navicat连接本地数据库失败,报错2003
  18. 华为海思Hi3798芯片盒子免TTL刷入Ubuntu_NAS系统【教程分享】
  19. Mysql全文索引解析
  20. HDU - 6638

热门文章

  1. 基于单例模式的日志输出(C++)
  2. Python 21 Flask(二)上下文管理详解
  3. 投资的境界:及时抓住机会或止损才是硬道理
  4. POJ 3376 Finding Palindromes(扩展kmp+trie)
  5. windows系统下Python环境的搭建
  6. JAVA学习笔记--4.多线程编程 part5.这些年的那些坑
  7. 网页html文档头部声明的两种常用模式
  8. Rails 添加新的运行环境
  9. ZooKeeper演示案例
  10. MyBatis基础知识汇总