apache 编程 Ubuntu Python php nginx 程序员 Android java google 微软 shell wordpress centos Firefox 云计算 linux 开源 Windows mysql

tomcat的server.xml实例

<?xml version='1.0' encoding='utf-8'?>

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

  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <Listener className="org.apache.catalina.core.JasperListener" />
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

   <GlobalNamingResources>
   <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>
<service name="Catalina">

  <Connector port="8080" maxHttpHeaderSize="8192" useBodyEncodingForURI="true"
               maxThreads="1000" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               compression="on" compressionMinSize="2048"
   compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain"
               connectionTimeout="20000" disableUploadTimeout="true"/>
  <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
  <Engine name="Catalina" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>
      <host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
            <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt" pattern="combined" resolveHosts="false"/>
      </Host>

      <Host name="wxd5981.com"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

        <Valve className="org.apache.catalina.valves.AccessLogValve"
                 directory="/data/logs/tomcat/"  prefix="wxd5981_access_log." suffix=".txt"
                 pattern="combined" resolveHosts="false"/>
      <Context path="" docBase="/data/wwwroot/wxd5981/" debug="0" reloadable="true" crossContext="true"> </Context>
      </Host>
    </Engine>
  </Service>
</Server>

延伸阅读

评论