1.1.1 Tomcat好帮手—JDK  

JDK包含了一批用于Java开发的组件,其中包括:

JDK****下载面页:

1.2 安装Tomcat & JDK

1.2.1 系统环境说明

1.2.2  安装JDK

命令集:

测试jdk是否安装成功↓

1.2.3 安装Tomcat

命令集:

检查tomcat是否安装成功

1.3 Tomcat目录介绍

1.3.1 tomcat主目录介绍

7 directories, 4 files

1.3.2 webapps目录介绍

5 directories, 0 files

1.3.3 Tomcat配置文件目录介绍(conf

2 directories, 10 files

1.4 Tomcat的管理

启动停止

         注意:tomcat未启动的情况下使用shutdown脚本,会有大量的输出信息。

检查tomcat__是否启动正常

1.4.1 启动完成浏览器进行访问

1.5 Tomcat日志说明

1.5.1 查看日志

         发现启动时间较长,其中有一项的启动时间占据了绝大多数

         发现耗时在这里:是session引起的随机数问题导致的。TocmatSession ID是通过SHA1算法计算得到的,计算Session ID的时候必须有一个密钥。为了提高安全性Tomcat在启动的时候会通过随机生成一个密钥。

1.5.2 解决Tomcat启动慢的方法

Tomcat启动慢主要原因是生成随机数的时候卡住了,导致tomcat启动不了。

cat /dev/random 会消耗能量

方法1****

改为

方法2****

方法3****:(推荐)

1.6 Tomcat管理功能使用

未修改文件前进行访问

         从而得出上面的配置文件信息。

1.6.1 web界面访问管理界面

         输入之前配置的账户与密码即可

1.7 Tomcat主配置文件详解

1.7.1 server.xml组件类别

1.7.2 组件介绍

  <td style="width: 389.55pt; border-top: 1pt solid #a5a5a5; border-right: 1pt solid #a5a5a5; border-bottom: 1pt solid #a5a5a5; border-left: none; background: #a5a5a5; padding: 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 宋体; times new roman"4times new roman";times new roman";color: white;">功能介绍</span></strong>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; background: #ededed; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">engine</span></strong>
    </p>
  </td>
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; background: #EDEDED; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph;">
      <span style="font-size: 10.0pt; font-family: 宋体;">核心容器组件,</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">catalina</span><span style="font-size: 10.0pt; font-family: 宋体;">引擎,负责通过</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">connector</span><span style="font-size: 10.0pt; font-family: 宋体;">接收用户请求,并处理请求,将请求转至对应的虚拟主机</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">host</span><span style="font-size: 10.0pt; font-family: 宋体;">。</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">host</span></strong>
    </p>
  </td>
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph;">
      <span style="font-size: 10.0pt; font-family: 宋体;">类似于</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">httpd</span><span style="font-size: 10.0pt; font-family: 宋体;">中的虚拟主机,一般而言支持基于</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">FQDN</span><span style="font-size: 10.0pt; font-family: 宋体;">的虚拟主机。</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; background: #ededed; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">context</span></strong>
    </p>
  </td>
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; background: #EDEDED; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph;">
      <span style="font-size: 10.0pt; font-family: 宋体;">定义一个应用程序,是一个最内层的容器类组件(不能再嵌套)。配置</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">context</span><span style="font-size: 10.0pt; font-family: 宋体;">的主要目的指定对应对的</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">webapp</span><span style="font-size: 10.0pt; font-family: 宋体;">的根目录,类似于</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">httpd</span><span style="font-size: 10.0pt; font-family: 宋体;">的</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">alias</span><span style="font-size: 10.0pt; font-family: 宋体;">,其还能为</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">webapp</span><span style="font-size: 10.0pt; font-family: 宋体;">指定额外的属性,如部署方式等。</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">connector</span></strong>
    </p>
  </td>
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph;">
      <span style="font-size: 10.0pt; font-family: 宋体;">接收用户请求,类似于</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">httpd</span><span style="font-size: 10.0pt; font-family: 宋体;">的</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">listen</span><span style="font-size: 10.0pt; font-family: 宋体;">配置监听端口的。</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; background: #ededed; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">service</span></strong><strong><span style="font-size: 10.0pt; font-family: 宋体;">(服务)</span></strong>
    </p>
  </td>
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; background: #EDEDED; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph;">
      <span style="font-size: 10.0pt; font-family: 宋体;">将</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">connector</span><span style="font-size: 10.0pt; font-family: 宋体;">关联至</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">engine</span><span style="font-size: 10.0pt; font-family: 宋体;">,因此一个</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">service</span><span style="font-size: 10.0pt; font-family: 宋体;">内部可以有多个</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">connector</span><span style="font-size: 10.0pt; font-family: 宋体;">,但只能有一个引擎</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">engine</span><span style="font-size: 10.0pt; font-family: 宋体;">。</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">service</span><span style="font-size: 10.0pt; font-family: 宋体;">内部有两个</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">connector</span><span style="font-size: 10.0pt; font-family: 宋体;">,一个</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">engine</span><span style="font-size: 10.0pt; font-family: 宋体;">。因此,一般情况下一个</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">server</span><span style="font-size: 10.0pt; font-family: 宋体;">内部只有一个</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">service</span><span style="font-size: 10.0pt; font-family: 宋体;">,一个</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">service</span><span style="font-size: 10.0pt; font-family: 宋体;">内部只有一个</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">engine</span><span style="font-size: 10.0pt; font-family: 宋体;">,但一个</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">service</span><span style="font-size: 10.0pt; font-family: 宋体;">内部可以有多个</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">connector</span><span style="font-size: 10.0pt; font-family: 宋体;">。</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">server</span></strong>
    </p>
  </td>
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph;">
      <span style="font-size: 10.0pt; font-family: 宋体;">表示一个运行于</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">JVM</span><span style="font-size: 10.0pt; font-family: 宋体;">中的</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">tomcat</span><span style="font-size: 10.0pt; font-family: 宋体;">实例。</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; background: #ededed; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">Valve</span></strong>
    </p>
  </td>
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; background: #EDEDED; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph;">
      <span style="font-size: 10.0pt; font-family: 宋体;">阀门,拦截请求并在将其转至对应的</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">webapp</span><span style="font-size: 10.0pt; font-family: 宋体;">前进行某种处理操作,可以用于任何容器中,比如记录日志</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">(access log valve)</span><span style="font-size: 10.0pt; font-family: 宋体;">、基于</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">IP</span><span style="font-size: 10.0pt; font-family: 宋体;">做访问控制</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">(remote address filter valve)</span><span style="font-size: 10.0pt; font-family: 宋体;">。</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">logger</span></strong>
    </p>
  </td>
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph;">
      <span style="font-size: 10.0pt; font-family: 宋体;">日志记录器,用于记录组件内部的状态信息,可以用于除</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">context</span><span style="font-size: 10.0pt; font-family: 宋体;">外的任何容器中。</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; background: #ededed; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">realm</span></strong>
    </p>
  </td>
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; background: #EDEDED; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph;">
      <span style="font-size: 10.0pt; font-family: 宋体;">可以用于任意容器类的组件中,关联一个用户认证库,实现认证和授权。可以关联的认证库有两种:</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">UserDatabaseRealm</span><span style="font-size: 10.0pt; font-family: 宋体;">、</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">MemoryRealm</span><span style="font-size: 10.0pt; font-family: 宋体;">和</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">JDBCRealm</span><span style="font-size: 10.0pt; font-family: 宋体;">。</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">UserDatabaseRealm</span></strong>
    </p>
  </td>
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph;">
      <span style="font-size: 10.0pt; font-family: 宋体;">使用</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">JNDI</span><span style="font-size: 10.0pt; font-family: 宋体;">自定义的用户认证库。</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; background: #ededed; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">MemoryRealm</span></strong>
    </p>
  </td>
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; background: #EDEDED; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph;">
      <span style="font-size: 10.0pt; font-family: 宋体;">认证信息定义在</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">tomcat-users.xml</span><span style="font-size: 10.0pt; font-family: 宋体;">中。</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">JDBCRealm</span></strong>
    </p>
  </td>
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph;">
      <span style="font-size: 10.0pt; font-family: 宋体;">认证信息定义在数据库中,并通过</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">JDBC</span><span style="font-size: 10.0pt; font-family: 宋体;">连接至数据库中查找认证用户。</span>
    </p>
  </td>
</tr>

1.7.3 server.xml配置文件注释

xml version=‘1.0’ encoding=‘utf-8’?>

«/span>Server port=“8005” shutdown=“SHUTDOWN”> «/span>Listener className=“org.apache.catalina.startup.VersionLoggerListener” /> «/span>Listener className=“org.apache.catalina.core.AprLifecycleListener” SSLEngine=“on” /> «/span>Listener className=“org.apache.catalina.core.JreMemoryLeakPreventionListener” /> «/span>Listener className=“org.apache.catalina.mbeans.GlobalResourcesLifecycleListener” /> «/span>Listener className=“org.apache.catalina.core.ThreadLocalLeakPreventionListener” /> «/span>GlobalNamingResources> «/span>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>

«/span>Service name=“Catalina”>

«/span>Connector port=“8080” protocol=“HTTP/1.1” connectionTimeout=“20000” redirectPort=“8443” /> «/span>Connector port=“8009” protocol=“AJP/1.3” redirectPort=“8443” />

«/span>Engine name=“Catalina” defaultHost=“localhost”>

«/span>Realm className=“org.apache.catalina.realm.LockOutRealm”> «/span>Realm className=“org.apache.catalina.realm.UserDatabaseRealm” resourceName=“UserDatabase”/> </Realm>

«/span>Host name=“localhost” appBase=“webapps” unpackWARs=“true” autoDeploy=“true”>

«/span>Context path="" docBase="" debug=""/> «/span>Valve className=“org.apache.catalina.valves.AccessLogValve” directory=“logs” prefix=“localhost_access_log” suffix=".txt" pattern="%h %l %u %t “%r” %s %b" /> </Host> </Engine> </Service> </Server>

<tr>
  <td style="width: 133.25pt; border-top: 1pt solid #a5a5a5; border-bottom: 1pt solid #a5a5a5; border-left: 1pt solid #a5a5a5; border-right: none; background: #a5a5a5; padding: 0cm 5.4pt;" valign="top" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 宋体; times new roman"4times new roman";times new roman";color: white;">参数</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 389.55pt; border-top: 1pt solid #a5a5a5; border-right: 1pt solid #a5a5a5; border-bottom: 1pt solid #a5a5a5; border-left: none; background: #a5a5a5; padding: 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 宋体; times new roman"4times new roman";times new roman";color: white;">参数说明</span></strong>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; background: #ededed; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">connector</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; background: #EDEDED; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">接收用户请求,类似于</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">httpd</span><span style="font-size: 10.0pt; font-family: 宋体;">的</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">listen</span><span style="font-size: 10.0pt; font-family: 宋体;">配置监听端口</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">.</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">port</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">指定服务器端要创建的端口号,并在这个端口监听来自客户端的请求。</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; background: #ededed; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">address</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; background: #EDEDED; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">指定连接器监听的地址,默认为所有地址(即</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">0.0.0.0</span><span style="font-size: 10.0pt; font-family: 宋体;">)</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">protocol</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">连接器使用的协议,支持</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">HTTP</span><span style="font-size: 10.0pt; font-family: 宋体;">和</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">AJP</span><span style="font-size: 10.0pt; font-family: 宋体;">。</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">AJP</span><span style="font-size: 10.0pt; font-family: 宋体;">(</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">Apache Jserv Protocol</span><span style="font-size: 10.0pt; font-family: 宋体;">)专用于</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">tomcat</span><span style="font-size: 10.0pt; font-family: 宋体;">与</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">apache</span><span style="font-size: 10.0pt; font-family: 宋体;">建立通信的,</span> <span style="font-size: 10.0pt; font-family: 宋体;">在</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">httpd</span><span style="font-size: 10.0pt; font-family: 宋体;">反向代理用户请求至</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">tomcat</span><span style="font-size: 10.0pt; font-family: 宋体;">时使用(可见</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">Nginx</span><span style="font-size: 10.0pt; font-family: 宋体;">反向代理时不可用</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">AJP</span><span style="font-size: 10.0pt; font-family: 宋体;">协议)。</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; background: #ededed; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">minProcessors</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; background: #EDEDED; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">服务器启动时创建的处理请求的线程数</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">maxProcessors</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">最大可以创建的处理请求的线程数</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; background: #ededed; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">enableLookups</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; background: #EDEDED; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">如果为</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">true</span><span style="font-size: 10.0pt; font-family: 宋体;">,则可以通过调用</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">request.getRemoteHost()</span><span style="font-size: 10.0pt; font-family: 宋体;">进行</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">DNS</span><span style="font-size: 10.0pt; font-family: 宋体;">查询来得到远程客户端的实际主机名,若为</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">false</span><span style="font-size: 10.0pt; font-family: 宋体;">则不进行</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">DNS</span><span style="font-size: 10.0pt; font-family: 宋体;">查询,而是返回其</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">ip</span><span style="font-size: 10.0pt; font-family: 宋体;">地址</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">redirectPort</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">指定服务器正在处理</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">http</span><span style="font-size: 10.0pt; font-family: 宋体;">请求时收到了一个</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">SSL</span><span style="font-size: 10.0pt; font-family: 宋体;">传输请求后重定向的端口号</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; background: #ededed; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">acceptCount</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; background: #EDEDED; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">指定当所有可以使用的处理请求的线程数都被使用时,可以放到处理队列中的请求数,超过这个数的请求将不予处理</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 133.25pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; padding: 0cm 5.4pt;" width="178">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">connectionTimeout</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 389.55pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="519">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">指定超时的时间数</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">(</span><span style="font-size: 10.0pt; font-family: 宋体;">以毫秒为单位</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">)</span>
    </p>
    
  </td>
  
</tr>
<tr>
  <td style="width: 134.45pt; border-top: 1pt solid #a5a5a5; border-bottom: 1pt solid #a5a5a5; border-left: 1pt solid #a5a5a5; border-right: none; background: #a5a5a5; padding: 0cm 5.4pt;" valign="top" width="179">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 宋体; times new roman"4times new roman";times new roman";color: white;">参数</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 388.35pt; border-top: 1pt solid #a5a5a5; border-right: 1pt solid #a5a5a5; border-bottom: 1pt solid #a5a5a5; border-left: none; background: #a5a5a5; padding: 0cm 5.4pt;" valign="top" width="518">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 宋体; times new roman"4times new roman";times new roman";color: white;">参数说明</span></strong>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 134.45pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; background: #ededed; padding: 0cm 5.4pt;" width="179">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">host</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 388.35pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; background: #EDEDED; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="518">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">表示一个虚拟主机</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 134.45pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; padding: 0cm 5.4pt;" width="179">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">name</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 388.35pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="518">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">指定主机名</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 134.45pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; background: #ededed; padding: 0cm 5.4pt;" width="179">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">appBase</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 388.35pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; background: #EDEDED; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="518">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">应用程序基本目录,即存放应用程序的目录</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">.</span><span style="font-size: 10.0pt; font-family: 宋体;">一般为</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">appBase="webapps" </span><span style="font-size: 10.0pt; font-family: 宋体;">,相对于</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">CATALINA_HOME</span><span style="font-size: 10.0pt; font-family: 宋体;">而言的,也可以写绝对路径。</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 134.45pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; padding: 0cm 5.4pt;" width="179">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">unpackWARs</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 388.35pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="518">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">如果为</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">true</span><span style="font-size: 10.0pt; font-family: 宋体;">,则</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">tomcat</span><span style="font-size: 10.0pt; font-family: 宋体;">会自动将</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">WAR</span><span style="font-size: 10.0pt; font-family: 宋体;">文件解压,否则不解压,直接从</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">WAR</span><span style="font-size: 10.0pt; font-family: 宋体;">文件中运行应用程序</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 134.45pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; background: #ededed; padding: 0cm 5.4pt;" width="179">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">autoDeploy</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 388.35pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; background: #EDEDED; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="518">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">在</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">tomcat</span><span style="font-size: 10.0pt; font-family: 宋体;">启动时,是否自动部署。</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 134.45pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; padding: 0cm 5.4pt;" width="179">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">xmlValidation</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 388.35pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="518">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">是否启动</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">xml</span><span style="font-size: 10.0pt; font-family: 宋体;">的校验功能,一般</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">xmlValidation="false"</span><span style="font-size: 10.0pt; font-family: 宋体;">。</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 134.45pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; background: #ededed; padding: 0cm 5.4pt;" width="179">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">xmlNamespaceAware</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 388.35pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; background: #EDEDED; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="518">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">检测名称空间,一般</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">xmlNamespaceAware="false"</span><span style="font-size: 10.0pt; font-family: 宋体;">。</span>
    </p>
    
  </td>
  
</tr>
<tr>
  <td style="width: 82.85pt; border-top: 1pt solid #a5a5a5; border-bottom: 1pt solid #a5a5a5; border-left: 1pt solid #a5a5a5; border-right: none; background: #a5a5a5; padding: 0cm 5.4pt;" valign="top" width="110">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 宋体; times new roman"4times new roman";times new roman";color: white;">参数</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 439.95pt; border-top: 1pt solid #a5a5a5; border-right: 1pt solid #a5a5a5; border-bottom: 1pt solid #a5a5a5; border-left: none; background: #a5a5a5; padding: 0cm 5.4pt;" valign="top" width="587">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 宋体; times new roman"4times new roman";times new roman";color: white;">参数说明</span></strong>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 82.85pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; background: #ededed; padding: 0cm 5.4pt;" width="110">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">Context</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 439.95pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; background: #EDEDED; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="587">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">表示一个</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">web</span><span style="font-size: 10.0pt; font-family: 宋体;">应用程序,通常为</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">WAR</span><span style="font-size: 10.0pt; font-family: 宋体;">文件</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 82.85pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; padding: 0cm 5.4pt;" width="110">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">docBase</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 439.95pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="587">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">应用程序的路径或者是</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">WAR</span><span style="font-size: 10.0pt; font-family: 宋体;">文件存放的路径</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">,</span><span style="font-size: 10.0pt; font-family: 宋体;">也可以使用相对路径,起始路径为此</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">Context</span><span style="font-size: 10.0pt; font-family: 宋体;">所属</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">Host</span><span style="font-size: 10.0pt; font-family: 宋体;">中</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">appBase</span><span style="font-size: 10.0pt; font-family: 宋体;">定义的路径。</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 82.85pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; background: #ededed; padding: 0cm 5.4pt;" width="110">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">path</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 439.95pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; background: #EDEDED; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="587">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">表示此</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">web</span><span style="font-size: 10.0pt; font-family: 宋体;">应用程序的</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">url</span><span style="font-size: 10.0pt; font-family: 宋体;">的前缀,这样请求的</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">url</span><span style="font-size: 10.0pt; font-family: 宋体;">为</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">http://localhost:8080/path/****</span>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 82.85pt; border-right: 1pt solid #c9c9c9; border-bottom: 1pt solid #c9c9c9; border-left: 1pt solid #c9c9c9; border-top: none; padding: 0cm 5.4pt;" width="110">
    <p style="margin-bottom: .0001pt; text-align: center;" align="center">
      <strong><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">reloadable</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 439.95pt; border-top: none; border-left: none; border-bottom: solid #C9C9C9 1.0pt; border-right: solid #C9C9C9 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="587">
    <p style="margin-bottom: .0001pt;">
      <span style="font-size: 10.0pt; font-family: 宋体;">这个属性非常重要,如果为</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">true</span><span style="font-size: 10.0pt; font-family: 宋体;">,则</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">tomcat</span><span style="font-size: 10.0pt; font-family: 宋体;">会自动检测应用程序的</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">/WEB-INF/lib </span><span style="font-size: 10.0pt; font-family: 宋体;">和</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">/WEB-INF/classes</span><span style="font-size: 10.0pt; font-family: 宋体;">目录的变化,自动装载新的应用程序,可以在不重启</span><span style="font-size: 10.0pt; font-family: 'Times New Roman',serif;">tomcat</span><span style="font-size: 10.0pt; font-family: 宋体;">的情况下改变应用程序</span>
    </p>
    
  </td>
  
</tr>
server {
    listen       </span>80<span style="color: #000000;">;
    server_name  localhost;
    location </span>/<span style="color: #000000;"> {
        root   html;
        index  index.jsp index.htm;
    proxy_pass http:</span>//<span style="color: #000000;">web_pools;
    }
    error_page   </span>500 502 503 504  /<span style="color: #000000;">50x.html;
    location </span>= /<span style="color: #000000;">50x.html {
        root   html;
    }
}

}

out.println("JVM memory detail info :"); out.println("Max memory:"+mm+"MB"+""); out.println("Total memory:"+tm+"MB"+""); out.println("Free memory:"+fm+"MB"+""); out.println("Available memory can be used is :"+(mm+fm-tm)+"MB"+""); %>

31906 org.apache.catalina.startup.Bootstrap start -Djava.util.logging.config.file=/application/tomcat8_1/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/application/tomcat8_1/endorsed -Dcatalina.base=/application/tomcat8_1 -Dcatalina.home=/application/tomcat8_1 -Djava.io.tmpdir=/application/tomcat8_1/temp

31812 org.apache.catalina.startup.Bootstrap start -Djava.util.logging.config.file=/application/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/application/tomcat/endorsed -Dcatalina.base=/application/tomcat -Dcatalina.home=/application/tomcat -Djava.io.tmpdir=/application/tomcat/temp

31932 org.apache.catalina.startup.Bootstrap start -Djava.util.logging.config.file=/application/tomcat8_2/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/application/tomcat8_2/endorsed -Dcatalina.base=/application/tomcat8_2 -Dcatalina.home=/application/tomcat8_2 -Djava.io.tmpdir=/application/tomcat8_2/temp

32079 sun.tools.jps.Jps -lvm -Denv.class.path=.:/application/jdk/lib:/application/jdk/jre/lib:/application/jdk/lib/tools.jar -Dapplication.home=/application/jdk1.8.0_60 -Xms8m

CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12345
-Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=10.0.0.17"

<tr>
  <td style="width: 19.5%; border-width: 1pt; border-style: solid; border-color: windowtext; background: #e6e6e6; padding: 0cm 5.4pt;" width="19%">
    <p style="text-align: center;" align="center">
      <strong><span style="font-family: 等线;">类别</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 28.58%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="28%">
    <p style="text-align: center;" align="center">
      <strong><span style="font-family: 等线;">配置内容及说明</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 30.08%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="30%">
    <p style="text-align: center;" align="center">
      <strong><span style="font-family: 等线;">标准配置</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 21.84%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="21%">
    <p style="text-align: center;" align="center">
      <strong><span style="font-family: 等线;">备注</span></strong>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 19.5%; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: 1pt solid windowtext; border-top: none; padding: 0cm 5.4pt;" width="19%">
    <p style="text-align: center;" align="center">
      telnet<span style="font-family: 等线;">管理端口保护</span>
    </p>
    
  </td>
  
  
  <td style="width: 28.58%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="28%">
    <p style="margin-left: 18.0pt; text-align: center;" align="center">
      1.<span style="font-family: 等线;">修改默认的</span>8005<span style="font-family: 等线;">管理端口为不易猜测的端口(大于</span>1024<span style="font-family: 等线;">);</span>
    </p>
    
    
    <p style="margin-left: 18.0pt; text-align: center;" align="center">
      2.<span style="font-family: 等线;">修改</span>SHUTDOWN<span style="font-family: 等线;">指令为其他字符串;</span>
    </p>
    
  </td>
  
  
  <td style="width: 30.08%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="30%">
    <p style="text-align: center;" align="center">
      <Server port="<strong><span style="color: red;">8527</span></strong>" shutdown="<strong><span style="color: red;">dangerous</span></strong>">
    </p>
    
  </td>
  
  
  <td style="width: 21.84%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="21%">
    <p style="text-align: center;" align="center">
      1.<span style="font-family: 等线;">以上配置项的配置内容只是建议配置,可以按照服务实际情况进行合理配置,但要求端口配置在</span><strong><span style="color: red;">8000~8999</span></strong><span style="font-family: 等线;">之间;</span>
    </p>
    
  </td>
  
</tr>
<tr>
  <td style="width: 20.28%; border-width: 1pt; border-style: solid; border-color: windowtext; background: #e6e6e6; padding: 0cm 5.4pt;" width="20%">
    <p style="text-align: center;" align="center">
      <strong><span style="font-family: 等线;">类别</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 29.72%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="29%">
    <p style="text-align: center;" align="center">
      <strong><span style="font-family: 等线;">配置内容及说明</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 27.32%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="27%">
    <p style="text-align: center;" align="center">
      <strong><span style="font-family: 等线;">标准配置</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 22.7%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="22%">
    <p style="text-align: center;" align="center">
      <strong><span style="font-family: 等线;">备注</span></strong>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 20.28%; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: 1pt solid windowtext; border-top: none; padding: 0cm 5.4pt;" width="20%">
    <p style="text-align: center;" align="center">
      Ajp <span style="font-family: 等线;">连接端口保护</span>
    </p>
    
  </td>
  
  
  <td style="width: 29.72%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="29%">
    <p style="text-align: center;" align="center">
      1.<span style="font-family: 等线;">修改默认的</span>ajp 8009<span style="font-family: 等线;">端口为不易冲突的大于</span>1024<span style="font-family: 等线;">端口;</span>
    </p>
    
    
    <p style="text-align: center;" align="center">
      2.<span style="font-family: 等线;">通过</span>iptables<span style="font-family: 等线;">规则</span><span style="font-family: 等线;">限制</span>ajp<span style="font-family: 等线;">端口访问的权限仅为线上机器;</span>
    </p>
    
  </td>
  
  
  <td style="width: 27.32%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="27%">
    <p style="text-align: center;" align="center">
      <Connector port="<strong><span style="color: red;">8528</span></strong>"
    </p>
    
    
    <p style="text-align: center;" align="center">
      protocol="AJP/1.3" />
    </p>
    
  </td>
  
  
  <td style="width: 22.7%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="22%">
    <p style="text-align: center;" align="center">
      <span style="font-family: 等线;">以上配置项的配置内容仅为建议配置,请按照服务实际情况进行合理配置,</span><span style="font-family: 等线;">但要求端口配置在</span><strong><span style="color: red;">8000~8999</span></strong><span style="font-family: 等线;">之间;</span><span style="font-family: 等线;">;</span>
    </p>
    
    
    <p style="text-align: center;" align="center">
      <span style="font-family: 等线;">保护此端口的目的在于防止线下的测试流量被</span>mod_jk<span style="font-family: 等线;">转发至线上</span>tomcat<span style="font-family: 等线;">服务器;</span>
    </p>
    
  </td>
  
</tr>
<tr>
  <td style="width: 16.22%; border-width: 1pt; border-style: solid; border-color: windowtext; background: #e6e6e6; padding: 0cm 5.4pt;" width="16%">
    <p style="text-align: center;" align="center">
      <strong><span style="font-family: 等线;">类别</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 11.8%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="11%">
    <p style="text-align: center;" align="center">
      <strong><span style="font-family: 等线;">配置内容及说明</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 35.12%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="35%">
    <p style="text-align: center;" align="center">
      <strong><span style="font-family: 等线;">标准配置</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 36.86%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="36%">
    <p style="text-align: center;" align="center">
      <strong><span style="font-family: 等线;">备注</span></strong>
    </p>
    
  </td>
  
</tr>


<tr style="height: 35.0pt;">
  <td style="width: 16.22%; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: 1pt solid windowtext; border-top: none; padding: 0cm 5.4pt; height: 35pt;" width="16%">
    <p style="text-align: center;" align="center">
      <span style="font-family: 等线;">禁用管理端</span>
    </p>
    
  </td>
  
  
  <td style="width: 11.8%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt; height: 35.0pt;" width="11%">
    <p style="text-align: center;" align="center">
      1. <span style="font-family: 等线;">删除默认的</span>{Tomcat<span style="font-family: 等线;">安装目录</span>}/conf/tomcat-users.xml<span style="font-family: 等线;">文件,重启</span>tomcat<span style="font-family: 等线;">后将会自动生成新的文件;</span>
    </p>
    
    
    <p style="text-align: center;" align="center">
      2. <span style="font-family: 等线;">删除</span>{Tomcat<span style="font-family: 等线;">安装目录</span>}/webapps<span style="font-family: 等线;">下默认的所有目录和文件;</span>
    </p>
    
    
    <p style="text-align: center;" align="center">
      3.<span style="font-family: 等线;">将</span>tomcat <span style="font-family: 等线;">应用根目录配置为</span>tomcat<span style="font-family: 等线;">安装目录以外的目录;</span>
    </p>
    
  </td>
  
  
  <td style="width: 35.12%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt; height: 35.0pt;" width="35%">
    <p style="text-align: center;" align="center">
      &nbsp;
    </p>
    
    
    <p style="text-align: center;" align="center">
      <Context path="" docBase=
    </p>
    
    
    <p style="text-align: center;" align="center">
      "<strong><span style="color: red;">/home/work/local/tomcat</span></strong>
    </p>
    
    
    <p style="text-align: center;" align="center">
      <strong><span style="color: red;">_webapps</span></strong>"
    </p>
    
    
    <p style="text-align: center;" align="center">
      debug="0"
    </p>
    
    
    <p style="text-align: center;" align="center">
      reloadable="false"
    </p>
    
    
    <p style="text-align: center;" align="center">
      crossContext="true"/>
    </p>
    
  </td>
  
  
  <td style="width: 36.86%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt; height: 35.0pt;" width="36%">
    <p style="text-align: center;" align="center">
      &nbsp;&nbsp;<span style="font-family: 等线;">对于前段</span>web<span style="font-family: 等线;">模块,</span>Tomcat<span style="font-family: 等线;">管理端属于</span>tomcat<span style="font-family: 等线;">的高危安全隐患,一旦被攻破,黑客通过上传</span>web shell<span style="font-family: 等线;">的方式将会直接取得服务器的控制权,后果极其严重;</span>
    </p>
    
  </td>
  
</tr>
</td>


<td style="width: 40.66%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="40%">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">配置内容及说明</span></strong>
  </p>
  
</td>


<td style="width: 8.14%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="8%">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">标准配置</span></strong>
  </p>
  
</td>


<td style="width: 36.32%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="36%">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">备注</span></strong>
  </p>
  
</td>
</td>


<td style="width: 40.66%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="40%">
  <p style="text-align: center;" align="center">
    1.tomcat<span style="font-family: 等线;">启动用户权限必须为非</span>root<span style="font-family: 等线;">权限,尽量降低</span>tomcat<span style="font-family: 等线;">启动用户的目录访问权限;</span>
  </p>
  
  
  <p style="text-align: center;" align="center">
    2.<span style="font-family: 等线;">如需直接对外使用</span>80<span style="font-family: 等线;">端口,可通过普通账号启动后,配置</span>iptables<span style="font-family: 等线;">规则进行转发;</span>
  </p>
  
</td>


<td style="width: 8.14%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="8%">
  &nbsp;
</td>


<td style="width: 36.32%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="36%">
  <p style="text-align: center;" align="center">
    <span style="font-family: 等线;">避免一旦</span>tomcat <span style="font-family: 等线;">服务</span><span style="font-family: 等线;">被入侵,黑客直接获取高级用户权限危害整个</span>server<span style="font-family: 等线;">的安全;</span>
  </p>
  
</td>
</td>


<td style="width: 24.3%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="24%">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">配置内容及说明</span></strong>
  </p>
  
</td>


<td style="width: 40.36%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="40%">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">标准配置</span></strong>
  </p>
  
</td>


<td style="width: 20.06%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="20%">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">备注</span></strong>
  </p>
  
</td>
</td>


<td style="width: 24.3%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="24%">
  <p style="text-align: center;" align="center">
    1.conf/web.xml<span style="font-family: 等线;">文件中</span>default<span style="font-family: 等线;">部分</span>listings<span style="font-family: 等线;">的配置必须为</span>false<span style="font-family: 等线;">;</span>
  </p>
  
</td>


<td style="width: 40.36%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="40%">
  <p style="text-align: center;" align="center">
    <init-param>
  </p>
  
  
  <p style="text-align: center;" align="center">
    <param-name />
    
    <strong>listings</strong></param-name>
  </p>
  
  
  <p style="text-align: center;" align="center">
    <param-value />
    
    <strong><span style="color: red;">false</span></strong></param-value>
  </p>
  
  
  <p style="text-align: center;" align="center">
    </init-param>
  </p>
  
</td>


<td style="width: 20.06%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="20%">
  <p style="text-align: center;" align="center">
    false<span style="font-family: 等线;">为不列出目录文件,</span>true<span style="font-family: 等线;">为允许列出,默认为</span>false<span style="font-family: 等线;">;</span>
  </p>
  
</td>
</td>


<td style="width: 20.96%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="20%">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">配置内容及说明</span></strong>
  </p>
  
</td>


<td style="width: 40%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="40%">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">标准配置</span></strong>
  </p>
  
</td>


<td style="width: 28.56%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="28%">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">备注</span></strong>
  </p>
  
</td>
</td>


<td style="width: 20.96%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt; height: 211.85pt;" width="20%">
  <p style="text-align: center;" align="center">
    1.<span style="font-family: 等线;">修改</span>conf/web.xml<span style="font-family: 等线;">,重定向</span>403<span style="font-family: 等线;">、</span>404<span style="font-family: 等线;">以及</span>500<span style="font-family: 等线;">等错误到指定的错误页面;</span>
  </p>
  
  
  <p style="text-align: center;" align="center">
    2.<span style="font-family: 等线;">也可以通过修改应用程序目录下的</span>WEB-INF/web.xml<span style="font-family: 等线;">下的配置进行错误页面的重定向;</span>
  </p>
  
</td>


<td style="width: 40.0%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt; height: 211.85pt;" width="40%">
  <p style="text-align: center;" align="center">
    <error-page>
  </p>
  
  
  <p style="text-align: center;" align="center">
    <error-code><strong><span style="color: red;">403</span></strong></error-code>
  </p>
  
  
  <p style="text-align: center;" align="center">
    <location><strong><span style="color: red;">/forbidden.jsp</span></strong></location>
  </p>
  
  
  <p style="text-align: center;" align="center">
    </error-page>
  </p>
  
  
  <p style="text-align: center;" align="center">
    <error-page>
  </p>
  
  
  <p style="text-align: center;" align="center">
    <error-code><strong><span style="color: red;">404</span></strong></error-code>
  </p>
  
  
  <p style="text-align: center;" align="center">
    <location><strong><span style="color: red;">/notfound.jsp</span></strong></location>
  </p>
  
  
  <p style="text-align: center;" align="center">
    </error-page>
  </p>
  
  
  <p style="text-align: center;" align="center">
    <error-page>
  </p>
  
  
  <p style="text-align: center;" align="center">
    <error-code><strong><span style="color: red;">500</span></strong></error-code>
  </p>
  
  
  <p style="text-align: center;" align="center">
    <location><strong><span style="color: red;">/systembusy.jsp</span></strong></location>
  </p>
  
  
  <p style="text-align: center;" align="center">
    </error-page>
  </p>
  
</td>


<td style="width: 28.56%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt; height: 211.85pt;" width="28%">
  <p style="text-align: center;" align="center">
    <span style="font-family: 等线;">在配置中对一些常见错误进行重定向,避免当出现错误时</span>tomcat<span style="font-family: 等线;">默认显示的错误页面暴露服务器和版本信息;</span>
  </p>
  
  
  <p style="text-align: center;" align="center">
    <span style="font-family: 等线;">必须确保程序根目录下的错误页面已经存在;</span>
  </p>
  
</td>
</td>


<td style="width: 25.24%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="25%">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">配置内容及说明</span></strong>
  </p>
  
</td>


<td style="width: 25.24%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="25%">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">标准配置</span></strong>
  </p>
  
</td>


<td style="width: 30.9%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="30%">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">备注</span></strong>
  </p>
  
</td>
</td>


<td style="width: 25.24%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="25%">
  <p style="text-align: center;" align="center">
    <span style="font-family: 等线;">在</span>HTTP Connector<span style="font-family: 等线;">配置中加入</span>server<span style="font-family: 等线;">的配置;</span>
  </p>
  
</td>


<td style="width: 25.24%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="25%">
  <p style="text-align: center;" align="center">
    server="<strong><span style="color: red;">webserver</span></strong>"
  </p>
  
  
  <p style="text-align: center;" align="center">
    &nbsp;
  </p>
  
</td>


<td style="width: 30.9%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="30%">
  <p style="text-align: center;" align="center">
    <span style="font-family: 等线;">当</span>tomcat HTTP<span style="font-family: 等线;">端口直接提供</span>web<span style="font-family: 等线;">服务时此配置生效,加入此配置,将会替换</span>http <span style="font-family: 等线;">响应</span>Server header<span style="font-family: 等线;">部分的默认配置,默认是</span><code>&lt;span style="font-size: 10.5pt; font-family: 'Times New Roman',serif;">Apache-Coyote/1.1&lt;/span></code>
  </p>
  
</td>
</td>


<td style="border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">配置内容及说明</span></strong>
  </p>
  
</td>


<td style="border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">标准配置或操作</span></strong>
  </p>
  
</td>


<td style="border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">备注</span></strong>
  </p>
  
</td>
</td>


<td style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;">
  <p style="text-align: center;" align="center">
    <span style="font-family: 等线;">通过配置,限定访问的</span>ip<span style="font-family: 等线;">来源</span>
  </p>
  
</td>


<td style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;">
  <p style="text-align: center;" align="center">
    <Context path="" docBase="/home/work/tomcat" debug="0" reloadable="false" crossContext="true">
  </p>
  
  
  <p style="text-align: center;" align="center">
    <Valve className="org.apache.catalina.valves.RemoteAddrValve" <strong><span style="color: red;">allow="61.148.18.138,61.135.165.*" deny="*.*.*.*"</span></strong><span style="color: red;">/</span>>
  </p>
  
  
  <p style="text-align: center;" align="center">
    </Context>
  </p>
  
</td>


<td style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;">
  <p style="text-align: center;" align="center">
    <span style="font-family: 等线;">通过配置信任</span>ip<span style="font-family: 等线;">的白名单,拒绝非白名单</span>ip<span style="font-family: 等线;">的访问,此配置主要是针对高保密级别的系统,一般产品线不需要;</span>
  </p>
  
</td>
<tr>
  <td style="width: 13.48%; border-width: 1pt; border-style: solid; border-color: windowtext; background: #e6e6e6; padding: 0cm 5.4pt;" width="13%">
    <p style="text-align: center;" align="center">
      <strong><span style="font-family: 等线;">类别</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 25.98%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="25%">
    <p style="text-align: center;" align="center">
      <strong><span style="font-family: 等线;">配置内容及说明</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 47.06%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="47%">
    <p style="text-align: center;" align="center">
      <strong><span style="font-family: 等线;">标准配置或操作</span></strong>
    </p>
    
  </td>
  
  
  <td style="width: 13.48%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="13%">
    <p style="text-align: center;" align="center">
      <strong><span style="font-family: 等线;">备注</span></strong>
    </p>
    
  </td>
  
</tr>


<tr>
  <td style="width: 13.48%; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: 1pt solid windowtext; border-top: none; padding: 0cm 5.4pt;" width="13%">
    <p style="text-align: center;" align="center">
      <span style="font-family: 等线;">起停脚本权限回收</span>
    </p>
    
  </td>
  
  
  <td style="width: 25.98%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="25%">
    <p style="text-align: center;" align="center">
      <span style="font-family: 等线;">去除其他用户对</span>Tomcat<span style="font-family: 等线;">的</span>bin<span style="font-family: 等线;">目录下</span>shutdown.sh<span style="font-family: 等线;">、</span>startup.sh<span style="font-family: 等线;">、</span>catalina.sh<span style="font-family: 等线;">的可执行权限;</span>
    </p>
    
  </td>
  
  
  <td style="width: 47.06%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="47%">
    <p style="text-align: center;" align="center">
      chmod -R 744 tomcat/bin/*
    </p>
    
  </td>
  
  
  <td style="width: 13.48%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="13%">
    <p style="text-align: center;" align="center">
      <span style="font-family: 等线;">防止其他用户有起停线上</span>Tomcat<span style="font-family: 等线;">的权限;</span>
    </p>
    
  </td>
  
</tr>
</td>


<td style="width: 18.7%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="18%">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">配置内容及说明</span></strong>
  </p>
  
</td>


<td style="width: 60.66%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="60%">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">标准配置或操作</span></strong>
  </p>
  
</td>


<td style="width: 12.98%; border-top: 1pt solid windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; border-left: none; background: #e6e6e6; padding: 0cm 5.4pt;" width="12%">
  <p style="text-align: center;" align="center">
    <strong><span style="font-family: 等线;">备注</span></strong>
  </p>
  
</td>
</td>


<td style="width: 18.7%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="18%">
  <p style="text-align: center;" align="center">
    <span style="font-family: 等线;">开启</span>Tomcat<span style="font-family: 等线;">默认访问日志中的</span>Referer<span style="font-family: 等线;">和</span>User-Agent<span style="font-family: 等线;">记录</span>
  </p>
  
</td>


<td style="width: 60.66%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="60%">
  <p style="text-align: center;" align="center">
    <Valve className="org.apache.catalina.valves.AccessLogValve"
  </p>
  
  
  <p style="text-align: center;" align="center">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directory="logs"&nbsp; prefix="localhost_access_log." suffix=".txt"
  </p>
  
  
  <p style="text-align: center;" align="center">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pattern="%h %l %u %t %r %s %b %{Referer}i %{User-Agent}i %D" resolveHosts="false"/>
  </p>
  
</td>


<td style="width: 12.98%; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" width="12%">
  <p style="text-align: center;" align="center">
    <span style="font-family: 等线;">开启</span>Referer<span style="font-family: 等线;">和</span>User-Agent<span style="font-family: 等线;">是为了一旦出现安全问题能够更好的根据日志进行问题排查;</span>
  </p>
  
</td>

<Connector port=“8080” server=“webserver”/>

<Valve className=“org.apache.catalina.valves.AccessLogValve”

&lt;Connector port="8528" protocol="AJP/1.3" />

<Context path="" docBase="/home/work/local/tomcat_webapps" debug=“0” reloadable=“false” crossContext=“true”/>

false</param-value> </init-param>

<error-page> <error-code>403</error-code> <location>/forbidden.jsp</location> </error-page> <error-page> <error-code>404</error-code> <location>/notfound.jsp</location> </error-page> <error-page> <error-code>500</error-code> <location>/systembusy.jsp</location> </error-page>

JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms800m -Xmx800m -XX:NewSize=400m -XX:MaxNewSize=400m -XX:PermSize=400m -XX:MaxPermSize=400m"

重启服务

su -c ‘/home/tomcat/tomcat8_1/bin/shutdown.sh’ tomcat su -c ‘/home/tomcat/tomcat8_1/bin/startup.sh’ tomcat

<li>
  <a href="#12_Tomcat_JDK">1.2 安装Tomcat & JDK</a><ul>
    <li>
      <a href="#121">1.2.1 系统环境说明</a>
    </li>
    <li>
      <a href="#122_nbspJDK">1.2.2 &nbsp;安装JDK</a>
    </li>
    <li>
      <a href="#123_Tomcat">1.2.3 安装Tomcat</a>
    </li>
  </ul>
</li>

<li>
  <a href="#13_Tomcat">1.3 Tomcat目录介绍</a><ul>
    <li>
      <a href="#131_tomcat">1.3.1 tomcat主目录介绍</a>
    </li>
    <li>
      <a href="#132_webapps">1.3.2 webapps目录介绍</a>
    </li>
    <li>
      <a href="#133_Tomcatconf">1.3.3 Tomcat配置文件目录介绍(conf)</a>
    </li>
  </ul>
</li>

<li>
  <a href="#14_Tomcat">1.4 Tomcat的管理</a><ul>
    <li>
      <a href="#141">1.4.1 启动完成浏览器进行访问</a>
    </li>
  </ul>
</li>

<li>
  <a href="#15_Tomcat">1.5 Tomcat日志说明</a><ul>
    <li>
      <a href="#151">1.5.1 查看日志</a>
    </li>
    <li>
      <a href="#152_Tomcat">1.5.2 解决Tomcat启动慢的方法</a>
    </li>
  </ul>
</li>

<li>
  <a href="#16_Tomcat">1.6 Tomcat管理功能使用</a><ul>
    <li>
      <a href="#161_web">1.6.1 在web界面访问管理界面</a>
    </li>
  </ul>
</li>

<li>
  <a href="#17_Tomcat">1.7 Tomcat主配置文件详解</a><ul>
    <li>
      <a href="#171_serverxml">1.7.1 server.xml组件类别</a>
    </li>
    <li>
      <a href="#172">1.7.2 组件介绍</a>
    </li>
    <li>
      <a href="#173_serverxml">1.7.3 server.xml配置文件注释</a>
    </li>
    <li>
      <a href="#174_Connector">1.7.4 Connector主要参数说明</a>
    </li>
    <li>
      <a href="#175_host">1.7.5 host参数详解</a>
    </li>
    <li>
      <a href="#176_Context">1.7.6 Context参数说明</a>
    </li>
  </ul>
</li>

<li>
  <a href="#18_WEB">1.8 WEB站点部署</a><ul>
    <li>
      <a href="#181_warweb">1.8.1 使用war包部署web站点</a>
    </li>
    <li>
      <a href="#182">1.8.2 自定义默认网站目录</a>
    </li>
    <li>
      <a href="#183_jpress">1.8.3 部署开源站点(jpress)</a>
    </li>
  </ul>
</li>

<li>
  <a href="#19_Tomcat">1.9 Tomcat多实例配置</a><ul>
    <li>
      <a href="#191">1.9.1 复制程序文件</a>
    </li>
    <li>
      <a href="#192">1.9.2 在浏览器访问,进行测试</a>
    </li>
  </ul>
</li>

<li>
  <a href="#110_tomcat">1.10 tomcat反向代理集群</a><ul>
    <li>
      <a href="#1101">1.10.1 负载均衡器说明</a>
    </li>
    <li>
      <a href="#1102">1.10.2 配置负载均衡器</a>
    </li>
    <li>
      <a href="#1103">1.10.3 使用命令进行访问测试</a>
    </li>
    <li>
      <a href="#1104">1.10.4 在浏览器上进行访问测试</a>
    </li>
  </ul>
</li>

<li>
  <a href="#111_tomcat">1.11 监控tomcat集群状态</a><ul>
    <li>
      <a href="#1111_java">1.11.1 方法一:开发java监控页面</a>
    </li>
    <li>
      <a href="#1112_jps">1.11.2 方法二:使用jps命令进行监控</a>
    </li>
    <li>
      <a href="#1113_Tomcat">1.11.3 Tomcat远程监控功能</a>
    </li>
    <li>
      <a href="#1114_zabbixtomcat">1.11.4 zabbix监控tomcat程序</a>
    </li>
    <li>
      <a href="#1115_tomcat">1.11.5 排除tomcat故障步骤</a>
    </li>
  </ul>
</li>

<li>
  <a href="#112_Tomcat">1.12 Tomcat安全优化</a>
</li>
<li>
  <a href="#1nbspnbspnbspnbsp_telnet">1.&nbsp;&nbsp;&nbsp;&nbsp; telnet管理端口保护(强制)</a>
</li>
<li>
  <a href="#2_ajp">2. ajp连接端口保护(推荐)</a>
</li>
<li>
  <a href="#3">3. 禁用管理端(强制)</a>
</li>
<li>
  <a href="#4">4. 降权启动(强制)</a>
</li>
<li>
  <a href="#5">5.文件列表访问控制(强制)</a>
</li>
<li>
  <a href="#6">6. 版本信息隐藏(强制)</a>
</li>
<li>
  <a href="#7_Server_header">7. Server header重写(推荐)</a>
</li>
<li>
  <a href="#8">8. 访问限制(可选)</a>
</li>
<li>
  <a href="#9nbspnbspnbspnbsp">9.&nbsp;&nbsp;&nbsp;&nbsp; 起停脚本权限回收(推荐)</a>
</li>
<li>
  <a href="#10nbspnbspnbsp">10.&nbsp;&nbsp;&nbsp; 访问日志格式规范(推荐)</a>
</li>
<li>
  <a href="#11nbspnbspnbsp">11.&nbsp;&nbsp;&nbsp; 附录:建议配置及标准执行方案</a>
</li>
<li>
  <a href="#113_Tomcat">1.13 Tomcat性能优化</a>
</li>