Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

TomCat6 server.xml

By: a guest on Jan 18th, 2011  |  syntax: XML  |  size: 7.00 KB  |  views: 150  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <!--
  2.  
  3.  Licensed to the Apache Software Foundation (ASF) under one or more
  4.  contributor license agreements.  See the NOTICE file distributed with
  5.  this work for additional information regarding copyright ownership.
  6.  The ASF licenses this file to You under the Apache License, Version 2.0
  7.  (the "License"); you may not use this file except in compliance with
  8.  the License.  You may obtain a copy of the License at
  9.  
  10.      http://www.apache.org/licenses/LICENSE-2.0
  11.  
  12.  Unless required by applicable law or agreed to in writing, software
  13.  distributed under the License is distributed on an "AS IS" BASIS,
  14.  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15.  See the License for the specific language governing permissions and
  16.  limitations under the License.
  17. -->
  18. <!--
  19. Note:  A "Server" is not itself a "Container", so you may not
  20.     define subcomponents such as "Valves" at this level.
  21.     Documentation at /docs/config/server.html
  22.  
  23. -->
  24. <Server port="5555" shutdown="SHUTDOWN">
  25. <!--
  26. APR library loader. Documentation at /docs/apr.html
  27. -->
  28. <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"/>
  29. <!--
  30. Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html
  31. -->
  32. <Listener className="org.apache.catalina.core.JasperListener"/>
  33. <!--
  34. JMX Support for the Tomcat server. Documentation at /docs/non-existent.html
  35. -->
  36. <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
  37. <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
  38. <!--
  39. Global JNDI resources
  40.       Documentation at /docs/jndi-resources-howto.html
  41.  
  42. -->
  43. <GlobalNamingResources>
  44. <!--
  45. Editable user database that can also be used by
  46.         UserDatabaseRealm to authenticate users
  47.    
  48. -->
  49. <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"/>
  50. </GlobalNamingResources>
  51. <!--
  52. A "Service" is a collection of one or more "Connectors" that share
  53.       a single "Container" Note:  A "Service" is not itself a "Container",
  54.       so you may not define subcomponents such as "Valves" at this level.
  55.       Documentation at /docs/config/service.html
  56.  
  57. -->
  58. <Service name="Catalina">
  59. <!--
  60. The connectors can use a shared executor, you can define one or more named thread pools
  61. -->
  62. <!--
  63.  
  64.    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
  65.        maxThreads="150" minSpareThreads="4"/>
  66.    
  67. -->
  68. <!--
  69. A "Connector" represents an endpoint by which requests are received
  70.         and responses are returned. Documentation at :
  71.         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
  72.         Java AJP  Connector: /docs/config/ajp.html
  73.         APR (HTTP/AJP) Connector: /docs/apr.html
  74.         Define a non-SSL HTTP/1.1 Connector on port 8080
  75.    
  76. -->
  77. <Connector port="8888" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/>
  78. <!-- A "Connector" using the shared thread pool-->
  79. <!--
  80.  
  81.    <Connector executor="tomcatThreadPool"
  82.               port="8080" protocol="HTTP/1.1"
  83.               connectionTimeout="20000"
  84.               redirectPort="8443" />
  85.    
  86. -->
  87. <!--
  88. Define a SSL HTTP/1.1 Connector on port 8443
  89.         This connector uses the JSSE configuration, when using APR, the
  90.         connector should be using the OpenSSL style configuration
  91.         described in the APR documentation
  92. -->
  93. <!--
  94.  
  95.    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
  96.               maxThreads="150" scheme="https" secure="true"
  97.               clientAuth="false" sslProtocol="TLS" />
  98.    
  99. -->
  100. <!-- Define an AJP 1.3 Connector on port 8009 -->
  101. <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>
  102. <!--
  103. An Engine represents the entry point (within Catalina) that processes
  104.         every request.  The Engine implementation for Tomcat stand alone
  105.         analyzes the HTTP headers included with the request, and passes them
  106.         on to the appropriate Host (virtual host).
  107.         Documentation at /docs/config/engine.html
  108. -->
  109. <!--
  110. You should set jvmRoute to support load-balancing via AJP ie :
  111.    <Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">        
  112.    
  113. -->
  114. <Engine name="Catalina" defaultHost="localhost">
  115. <!--
  116. For clustering, please take a look at documentation at:
  117.          /docs/cluster-howto.html  (simple how to)
  118.          /docs/config/cluster.html (reference documentation)
  119. -->
  120. <!--
  121.  
  122.      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
  123.      
  124. -->
  125. <!--
  126. The request dumper valve dumps useful debugging information about
  127.           the request and response data received and sent by Tomcat.
  128.           Documentation at: /docs/config/valve.html
  129. -->
  130. <!--
  131.  
  132.      <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
  133.      
  134. -->
  135. <!--
  136. This Realm uses the UserDatabase configured in the global JNDI
  137.           resources under the key "UserDatabase".  Any edits
  138.           that are performed against this UserDatabase are immediately
  139.           available for use by the Realm.  
  140. -->
  141. <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
  142. <!--
  143. Define the default virtual host
  144.           Note: XML Schema validation will not work with Xerces 2.2.
  145.      
  146. -->
  147. <Host name="unused" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
  148.       </Host>
  149. <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
  150.             @@iisrootref@@            
  151.       </Host>
  152. <!--
  153.  
  154.        Add additional VIRTUALHOSTS by copying the following example config:
  155.        REPLACE:
  156.        [ENTER DOMAIN NAME] with a domain, IE: www.mysite.com
  157.        [ENTER SYSTEM PATH] with your web site's base directory. IE: /home/user/public_html/ or C:\websites\www.mysite.com\ etc...
  158.        Don't forget to remove comments! ;)
  159.      
  160. -->
  161. <!--
  162.  
  163.        <Host name="[ENTER DOMAIN NAME]" appBase="webapps">
  164.             <Context path="" docBase="[ENTER SYSTEM PATH]" />
  165.        </Host>
  166.      
  167. -->
  168. </Engine>
  169. </Service>
  170. <Service name="stable">
  171. <Connector port="80" protocol="HTTP/1.1" maxThreads="150" connectionTimeout="20000"/>
  172. <Engine name="stable" defaultHost="localhost">
  173. <Host name="localhost1" appBase="webapp1">
  174. <Context docBase="C:\websites\test\stable\"/>
  175. </Host>
  176. </Engine>
  177. </Service>
  178. <Service name="release">
  179. <Connector port="81" protocol="HTTP/1.1" maxThreads="150" connectionTimeout="20000"/>
  180. <Engine name="release" defaultHost="localhost2">
  181. <Host name="localhost2" appBase="webapp2">
  182. <Context docBase="C:\websites\test\release\"/>
  183. </Host>
  184. </Engine>
  185. </Service>
  186. </Server>