Tomact配置(详细)

Tomact配置

Tomcat下confserver.xml的文件配置信息,基本上不用做任何修改就可以使用,修改的地方就是host区域的一些配置,此文件设置端口为80。

注意:Tomcat配置文件中(即server.xml文件)不能出现中文,否则服务是无法启动的。


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

   <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"  
             debug="0"/>  
   <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"  
             debug="0"/>  

   <GlobalNamingResources>  
     <Environment name="simpleValue" type="http://lib.csdn.net/base/javase" class='replace_word' title="Java SE知识库" target='_blank' style='color:#df3434; font-weight:bold;'>Javaa>.lang.Integer" value="30"/>  
     <Resource name="UserDatabase" auth="http://lib.csdn.net/base/docker" class='replace_word' title="Docker知识库" target='_blank' style='color:#df3434; font-weight:bold;'>Containera>"  
               type="org.apache.catalina.UserDatabase"  
        description="User database that can be updated and saved">  
     Resource>  
     <ResourceParams name="UserDatabase">  
       <parameter>  
         <name>factoryname>  
     
         <value>org.apache.catalina.users.MemoryUserDatabaseFactoryvalue>  
       parameter>  
       <parameter>  
         <name>pathnamename>  
         <value>conf/tomcat-users.xmlvalue>  
       parameter>  
     ResourceParams>  
   GlobalNamingResources>  

   <Service name="Catalina">  

       
     <Connector port="80"  
                maxThreads="150" minSpareThreads="25" maxSpareThreads="75"  
                enableLookups="false" redirectPort="8443" acceptCount="100"  
                debug="0" connectionTimeout="20000"  
                disableUploadTimeout="true" />  

     <Connector port="8009"  
                enableLookups="false" redirectPort="8443" debug="0"  
                protocol="AJP/1.3" />  
  
     <Engine name="Catalina" defaultHost="localhost" debug="0">  
         
       <Logger className="org.apache.catalina.logger.FileLogger"  
               prefix="catalina_log." suffix=".txt"  
               timestamp="true"/>  
      
       <Realm className="org.apache.catalina.realm.UserDatabaseRealm"  
                  debug="0" resourceName="UserDatabase"/>  
          
   <Host name="192.168.4.247" debug="0" appBase="D:/project/hbgs_dddu/webapps"  
        unpackWARs="true" autoDeploy="true"  
        xmlValidation="false" xmlNamespaceAware="false">  
     
         <Logger className="org.apache.catalina.logger.FileLogger"  
                  directory="logs"   prefix="localhost_log.zx" suffix=".txt"  
             timestamp="true"/>  
     
   <Context path="" docBase="D:/project/hbgs_dddu/webapps" debug="0" reloadable="true"/>  
   Host>  
     Engine>  
   Service>  
Server>  

你可能感兴趣的:(后端--开发)