tomcat配置文件详解

在tomcat安装目录下的 conf 子目录中,有以下的 tomcat 的配置文件

文件名 说明
server.xml 主配置文件
web.xml 每个webapp只有“部署”后才能被访问,它的部署方式通常由web.xml进行 定义,其存放位置为WEB-INF/目录中;此文件为所有的webapps提供默认 部署相关的配置,每个web应用也可以使用专用配置文件,来覆盖全局文件

tomcat-users.xml  

用户认证的账号和密码文件
catalina.policy 当使用security选项启动tomcat时,用于为tomcat设置安全策略
catalina.properties Tomcat 环境变量的配置,用于设定类加载器路径,以及一些与JVM调优相 关参数
logging.properties Tomcat 日志系统相关的配置,可以修改日志级别和日志路径等
context.xml

用于定义所有web应用均需加载的Context配置,此文件为所有的 webapps提供默认配置,每个web应用也可以使用自已专用的配置,它通 常由专用的配置文件context.xml来定义,其存放位置为WEB-IN

F/目录中, 覆盖全局的文件

1.主配置文件内容

[root@tomcat data]# grep -v '\-\-' /usr/local/tomcat/conf/server.xml

  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.
     define subcomponents such as "Valves" at this level.
     Documentation at /docs/config/server.html

  
  
  
  
  
  

       Documentation at /docs/jndi-resources-howto.html
  
         UserDatabaseRealm to authenticate users
    
  

       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
  

    


         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
    
    
         This connector uses the NIO implementation. The default
         SSLImplementation will depend on the presence of the APR/native
         library and the useOpenSSL attribute of the AprLifecycleListener.
         Either JSSE or OpenSSL style configuration may be used regardless of
         the SSLImplementation selected. JSSE style configuration is used below.
    
        
            
        
    
         This connector uses the APR/native implementation which always uses
         OpenSSL for TLS.
         Either JSSE or OpenSSL style configuration may be used. OpenSSL style
         configuration is used below.
    
        
        
            
        
    

    

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

    
    

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

      
             resources under the key "UserDatabase".  Any edits
             that are performed against this UserDatabase are immediately
        
      

      

        

             Documentation at: /docs/config/valve.html
        

      
    
  
[root@tomcat data]# grep -v '\-\-' /usr/local/tomcat/conf/context.xml 

  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.


    WEB-INF/web.xml
    ${catalina.base}/conf/web.xml

    


 

你可能感兴趣的:(Tomcat,tomcat,java,servlet)