Advertisement
Guest User

Untitled

a guest
Jun 6th, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.93 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  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. <!-- Note: A "Server" is not itself a "Container", so you may not
  19. define subcomponents such as "Valves" at this level.
  20. Documentation at /docs/config/server.html
  21. -->
  22. <Server port="8005" shutdown="SHUTDOWN">
  23. <Listener className="org.apache.catalina.startup.VersionLoggerListener"/>
  24. <!-- Security listener. Documentation at /docs/config/listeners.html
  25. <Listener className="org.apache.catalina.security.SecurityListener" />
  26. -->
  27. <!--APR library loader. Documentation at /docs/apr.html -->
  28. <Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/>
  29. <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  30. <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
  31. <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
  32. <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>
  33.  
  34. <!-- Global JNDI resources
  35. Documentation at /docs/jndi-resources-howto.html
  36. -->
  37. <GlobalNamingResources>
  38. <!-- Editable user database that can also be used by
  39. UserDatabaseRealm to authenticate users
  40. -->
  41. <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
  42. </GlobalNamingResources>
  43.  
  44. <!-- A "Service" is a collection of one or more "Connectors" that share
  45. a single "Container" Note: A "Service" is not itself a "Container",
  46. so you may not define subcomponents such as "Valves" at this level.
  47. Documentation at /docs/config/service.html
  48. -->
  49. <Service name="Catalina">
  50.  
  51. <!--The connectors can use a shared executor, you can define one or more named thread pools-->
  52. <!--
  53. <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
  54. maxThreads="150" minSpareThreads="4"/>
  55. -->
  56.  
  57.  
  58. <!-- A "Connector" represents an endpoint by which requests are received
  59. and responses are returned. Documentation at :
  60. Java HTTP Connector: /docs/config/http.html
  61. Java AJP Connector: /docs/config/ajp.html
  62. APR (HTTP/AJP) Connector: /docs/apr.html
  63. Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
  64. -->
  65. <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
  66. <!-- A "Connector" using the shared thread pool-->
  67. <!--
  68. <Connector executor="tomcatThreadPool"
  69. port="8080" protocol="HTTP/1.1"
  70. connectionTimeout="20000"
  71. redirectPort="8443" />
  72. -->
  73. <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
  74. This connector uses the NIO implementation. The default
  75. SSLImplementation will depend on the presence of the APR/native
  76. library and the useOpenSSL attribute of the
  77. AprLifecycleListener.
  78. Either JSSE or OpenSSL style configuration may be used regardless of
  79. the SSLImplementation selected. JSSE style configuration is used below.
  80. -->
  81. <Connector SSLEnabled="true" clientAuth="false" keystoreFile=".\conf\MyCert.cert" keystorePass="tomcat" maxThreads="150" port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https" secure="true" sslProtocol="TLS"/>
  82. <!--
  83. <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
  84. maxThreads="150" SSLEnabled="true">
  85. <SSLHostConfig>
  86. <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
  87. type="RSA" />
  88. </SSLHostConfig>
  89. </Connector>
  90. -->
  91. <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
  92. This connector uses the APR/native implementation which always uses
  93. OpenSSL for TLS.
  94. Either JSSE or OpenSSL style configuration may be used. OpenSSL style
  95. configuration is used below.
  96. -->
  97. <!--
  98. <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
  99. maxThreads="150" SSLEnabled="true" >
  100. <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
  101. <SSLHostConfig>
  102. <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
  103. certificateFile="conf/localhost-rsa-cert.pem"
  104. certificateChainFile="conf/localhost-rsa-chain.pem"
  105. type="RSA" />
  106. </SSLHostConfig>
  107. </Connector>
  108. -->
  109.  
  110. <!-- Define an AJP 1.3 Connector on port 8009 -->
  111. <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>
  112.  
  113.  
  114. <!-- An Engine represents the entry point (within Catalina) that processes
  115. every request. The Engine implementation for Tomcat stand alone
  116. analyzes the HTTP headers included with the request, and passes them
  117. on to the appropriate Host (virtual host).
  118. Documentation at /docs/config/engine.html -->
  119.  
  120. <!-- You should set jvmRoute to support load-balancing via AJP ie :
  121. <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
  122. -->
  123. <Engine defaultHost="localhost" name="Catalina">
  124.  
  125. <!--For clustering, please take a look at documentation at:
  126. /docs/cluster-howto.html (simple how to)
  127. /docs/config/cluster.html (reference documentation) -->
  128. <!--
  129. <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
  130. -->
  131.  
  132. <!-- Use the LockOutRealm to prevent attempts to guess user passwords
  133. via a brute-force attack -->
  134. <Realm className="org.apache.catalina.realm.LockOutRealm">
  135. <!-- This Realm uses the UserDatabase configured in the global JNDI
  136. resources under the key "UserDatabase". Any edits
  137. that are performed against this UserDatabase are immediately
  138. available for use by the Realm. -->
  139. <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
  140. </Realm>
  141.  
  142.  
  143. <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
  144.  
  145. <Realm className="org.apache.catalina.realm.JDBCRealm"
  146. connectionURL="jdbc:sqlserver://155.158.112.31:1433;databaseName=tomcatAuth;user=tomcatuser;password=tomcat"
  147. driverName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
  148. roleNameCol="role_name" userCredCol="user_pass" userNameCol="user_name" userRoleTable="user_roles" userTable="users"/>
  149.  
  150. <!-- SingleSignOn valve, share authentication between web applications
  151. Documentation at: /docs/config/valve.html -->
  152. <!--
  153. <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
  154. -->
  155.  
  156. <!-- Access log processes all example.
  157. Documentation at: /docs/config/valve.html
  158. Note: The pattern used is equivalent to using pattern="common" -->
  159. <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="localhost_access_log" suffix=".txt"/>
  160.  
  161. </Host>
  162. </Engine>
  163. </Service>
  164. </Server>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement