Advertisement
levrun

server.xml for bitnami ami tomcat support

Dec 20th, 2014
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 5.41 KB | None | 0 0
  1. <Server port="8005" shutdown="SHUTDOWN">
  2.   <Listener className="org.apache.catalina.startup.VersionLoggerListener"/>
  3.   <!-- Security listener. Documentation at /docs/config/listeners.html
  4.  <Listener className="org.apache.catalina.security.SecurityListener" />
  5.  -->
  6.   <!--APR library loader. Documentation at /docs/apr.html -->
  7.   <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"/>
  8.   <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  9.   <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
  10.   <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
  11.   <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>
  12.  
  13.   <!-- Global JNDI resources
  14.       Documentation at /docs/jndi-resources-howto.html
  15.  -->
  16.   <GlobalNamingResources>
  17.     <!-- Editable user database that can also be used by
  18.         UserDatabaseRealm to authenticate users
  19.    -->
  20.     <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"/>
  21.   </GlobalNamingResources>
  22.  
  23.   <!-- A "Service" is a collection of one or more "Connectors" that share
  24.       a single "Container" Note:  A "Service" is not itself a "Container",
  25.       so you may not define subcomponents such as "Valves" at this level.
  26.       Documentation at /docs/config/service.html
  27.   -->
  28.   <Service name="Catalina">
  29.  
  30.     <!--The connectors can use a shared executor, you can define one or more named thread pools-->
  31.   <!--
  32.    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
  33.        maxThreads="150" minSpareThreads="4"/>
  34.    -->
  35.  
  36.  
  37.     <!-- A "Connector" represents an endpoint by which requests are received
  38.         and responses are returned. Documentation at :
  39.         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
  40.         Java AJP  Connector: /docs/config/ajp.html
  41.         APR (HTTP/AJP) Connector: /docs/apr.html
  42.         Define a non-SSL HTTP/1.1 Connector on port 8080
  43.    -->
  44.     <Connector port="8080" URIEncoding="UTF-8" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/>
  45.     <!-- A "Connector" using the shared thread pool-->
  46.     <!--
  47.    <Connector executor="tomcatThreadPool"
  48.               port="8080" protocol="HTTP/1.1"
  49.               connectionTimeout="20000"
  50.               redirectPort="8443" />
  51.    -->
  52.     <!-- Define a SSL HTTP/1.1 Connector on port 8443
  53.         This connector uses the NIO implementation that requires the JSSE
  54.         style configuration. When using the APR/native implementation, the
  55.         OpenSSL style configuration is required as described in the APR/native
  56.         documentation -->
  57.     <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
  58.               maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
  59.               keystoreFile="conf/ssl/keystore" keystorePass="changeit"
  60.               clientAuth="false" sslProtocol="TLS" />
  61.  
  62.     <!-- Define an AJP 1.3 Connector on port 8009 -->
  63.     <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>
  64.  
  65.  
  66.     <!-- An Engine represents the entry point (within Catalina) that processes
  67.         every request.  The Engine implementation for Tomcat stand alone
  68.         analyzes the HTTP headers included with the request, and passes them
  69.         on to the appropriate Host (virtual host).
  70.         Documentation at /docs/config/engine.html -->
  71.  
  72.     <!-- You should set jvmRoute to support load-balancing via AJP ie :
  73.    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
  74.    -->
  75.     <Engine name="Catalina" defaultHost="localhost">
  76.   <!--For clustering, please take a look at documentation at:
  77.          /docs/cluster-howto.html  (simple how to)
  78.          /docs/config/cluster.html (reference documentation) -->
  79.       <!--
  80.      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
  81.      -->
  82.  
  83.       <!-- Use the LockOutRealm to prevent attempts to guess user passwords
  84.           via a brute-force attack -->
  85.       <Realm className="org.apache.catalina.realm.LockOutRealm">
  86.         <!-- This Realm uses the UserDatabase configured in the global JNDI
  87.             resources under the key "UserDatabase".  Any edits
  88.             that are performed against this UserDatabase are immediately
  89.             available for use by the Realm.  -->
  90.         <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
  91.       </Realm>
  92.  
  93.       <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" startStopThreads="-1">
  94.         <Context docBase="mutibo" path="" />
  95.         <!-- SingleSignOn valve, share authentication between web applications
  96.             Documentation at: /docs/config/valve.html -->
  97.         <!--
  98.        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
  99.        -->
  100.  
  101.         <!-- Access log processes all example.
  102.             Documentation at: /docs/config/valve.html
  103.             Note: The pattern used is equivalent to using pattern="common" -->
  104.         <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b"/>
  105.  
  106.       </Host>
  107.     </Engine>
  108.   </Service>
  109. </Server>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement