Advertisement
Fhernd

server-cas-client.xml

Apr 28th, 2018
408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 8.37 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2.  
  3. <!--
  4.  
  5.  Licensed to the Apache Software Foundation (ASF) under one or more
  6.  
  7.  contributor license agreements.  See the NOTICE file distributed with
  8.  
  9.  this work for additional information regarding copyright ownership.
  10.  
  11.  The ASF licenses this file to You under the Apache License, Version 2.0
  12.  
  13.  (the "License"); you may not use this file except in compliance with
  14.  
  15.  the License.  You may obtain a copy of the License at
  16.  
  17.  
  18.  
  19.      http://www.apache.org/licenses/LICENSE-2.0
  20.  
  21.  
  22.  
  23.  Unless required by applicable law or agreed to in writing, software
  24.  
  25.  distributed under the License is distributed on an "AS IS" BASIS,
  26.  
  27.  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  28.  
  29.  See the License for the specific language governing permissions and
  30.  
  31.  limitations under the License.
  32.  
  33. -->
  34.  
  35. <!-- Note:  A "Server" is not itself a "Container", so you may not
  36.  
  37.     define subcomponents such as "Valves" at this level.
  38.  
  39.     Documentation at /docs/config/server.html
  40.  
  41. -->
  42.  
  43. <Server port="8005" shutdown="SHUTDOWN">
  44.  
  45.   <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
  46.  
  47.   <!-- Security listener. Documentation at /docs/config/listeners.html
  48.  
  49.  <Listener className="org.apache.catalina.security.SecurityListener" />
  50.  
  51.  -->
  52.  
  53.   <!--APR library loader. Documentation at /docs/apr.html -->
  54.  
  55.   <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  56.  
  57.   <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  58.  
  59.   <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  60.  
  61.   <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  62.  
  63.   <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
  64.  
  65.  
  66.  
  67.   <!-- Global JNDI resources
  68.  
  69.       Documentation at /docs/jndi-resources-howto.html
  70.  
  71.  -->
  72.  
  73.   <GlobalNamingResources>
  74.  
  75.     <!-- Editable user database that can also be used by
  76.  
  77.         UserDatabaseRealm to authenticate users
  78.  
  79.    -->
  80.  
  81.     <Resource name="UserDatabase" auth="Container"
  82.  
  83.              type="org.apache.catalina.UserDatabase"
  84.  
  85.              description="User database that can be updated and saved"
  86.  
  87.              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
  88.  
  89.              pathname="conf/tomcat-users.xml" />
  90.  
  91.   </GlobalNamingResources>
  92.  
  93.  
  94.  
  95.   <!-- A "Service" is a collection of one or more "Connectors" that share
  96.  
  97.       a single "Container" Note:  A "Service" is not itself a "Container",
  98.  
  99.       so you may not define subcomponents such as "Valves" at this level.
  100.  
  101.       Documentation at /docs/config/service.html
  102.  
  103.   -->
  104.  
  105.   <Service name="Catalina">
  106.  
  107.  
  108.  
  109.     <!--The connectors can use a shared executor, you can define one or more named thread pools-->
  110.  
  111.     <!--
  112.  
  113.    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
  114.  
  115.        maxThreads="150" minSpareThreads="4"/>
  116.  
  117.    -->
  118.  
  119.  
  120.  
  121.  
  122.  
  123.     <!-- A "Connector" represents an endpoint by which requests are received
  124.  
  125.         and responses are returned. Documentation at :
  126.  
  127.         Java HTTP Connector: /docs/config/http.html
  128.  
  129.         Java AJP  Connector: /docs/config/ajp.html
  130.  
  131.         APR (HTTP/AJP) Connector: /docs/apr.html
  132.  
  133.         Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
  134.  
  135.    -->
  136.  
  137.     <Connector port="8443"
  138.         protocol="org.apache.coyote.http11.Http11NioProtocol"
  139.         SSLEnabled="true"
  140.  
  141.         maxThreads="150"
  142.  
  143.         scheme="https"
  144.  
  145.         secure="true"
  146.         acceptCount="100"
  147.  
  148.         clientAuth="false"
  149.  
  150.         sslProtocol="TLS"
  151.         executor="tomcatThreadPool"
  152.         keyAlias="localhost"
  153.         truststoreFile="/opt/CAS/certs/cacerts.jks"
  154.  
  155.         keystoreFile="/opt/CAS/certs/server.keystore"
  156.  
  157.         keystorePass="dianacas"
  158.         truestorePass="dianacas"
  159.         maxKeepAliveRequests="15"
  160.  
  161.               connectionTimeout="20000"
  162.  
  163.               redirectPort="8443" />
  164.     <!--<Connector port="8080" protocol="HTTP/1.1"
  165.  
  166.               connectionTimeout="20000"
  167.  
  168.               redirectPort="8443" />-->
  169.  
  170.     <!-- A "Connector" using the shared thread pool-->
  171.  
  172.     <!--
  173.  
  174.    <Connector executor="tomcatThreadPool"
  175.  
  176.               port="8080" protocol="HTTP/1.1"
  177.  
  178.               connectionTimeout="20000"
  179.  
  180.               redirectPort="8443" />
  181.  
  182.    -->
  183.  
  184.     <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
  185.  
  186.         This connector uses the NIO implementation. The default
  187.  
  188.         SSLImplementation will depend on the presence of the APR/native
  189.  
  190.         library and the useOpenSSL attribute of the
  191.  
  192.         AprLifecycleListener.
  193.  
  194.         Either JSSE or OpenSSL style configuration may be used regardless of
  195.  
  196.         the SSLImplementation selected. JSSE style configuration is used below.
  197.  
  198.    -->
  199.  
  200.     <!--
  201.  
  202.    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
  203.  
  204.               maxThreads="150" SSLEnabled="true">
  205.  
  206.        <SSLHostConfig>
  207.  
  208.            <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
  209.  
  210.                         type="RSA" />
  211.  
  212.        </SSLHostConfig>
  213.  
  214.    </Connector>
  215.  
  216.    -->
  217.  
  218.     <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
  219.  
  220.         This connector uses the APR/native implementation which always uses
  221.  
  222.         OpenSSL for TLS.
  223.  
  224.         Either JSSE or OpenSSL style configuration may be used. OpenSSL style
  225.  
  226.         configuration is used below.
  227.  
  228.    -->
  229.  
  230.     <!--
  231.  
  232.    <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
  233.  
  234.               maxThreads="150" SSLEnabled="true" >
  235.  
  236.        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
  237.  
  238.        <SSLHostConfig>
  239.  
  240.            <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
  241.  
  242.                         certificateFile="conf/localhost-rsa-cert.pem"
  243.  
  244.                         certificateChainFile="conf/localhost-rsa-chain.pem"
  245.  
  246.                         type="RSA" />
  247.  
  248.        </SSLHostConfig>
  249.  
  250.    </Connector>
  251.  
  252.    -->
  253.  
  254.  
  255.  
  256.     <!-- Define an AJP 1.3 Connector on port 8009 -->
  257.  
  258.     <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
  259.  
  260.  
  261.  
  262.  
  263.  
  264.     <!-- An Engine represents the entry point (within Catalina) that processes
  265.  
  266.         every request.  The Engine implementation for Tomcat stand alone
  267.  
  268.         analyzes the HTTP headers included with the request, and passes them
  269.  
  270.         on to the appropriate Host (virtual host).
  271.  
  272.         Documentation at /docs/config/engine.html -->
  273.  
  274.  
  275.  
  276.     <!-- You should set jvmRoute to support load-balancing via AJP ie :
  277.  
  278.    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
  279.  
  280.    -->
  281.  
  282.     <Engine name="Catalina" defaultHost="localhost">
  283.  
  284.  
  285.  
  286.       <!--For clustering, please take a look at documentation at:
  287.  
  288.          /docs/cluster-howto.html  (simple how to)
  289.  
  290.          /docs/config/cluster.html (reference documentation) -->
  291.  
  292.       <!--
  293.  
  294.      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
  295.  
  296.      -->
  297.  
  298.  
  299.  
  300.       <!-- Use the LockOutRealm to prevent attempts to guess user passwords
  301.  
  302.           via a brute-force attack -->
  303.  
  304.       <Realm className="org.apache.catalina.realm.LockOutRealm">
  305.  
  306.         <!-- This Realm uses the UserDatabase configured in the global JNDI
  307.  
  308.             resources under the key "UserDatabase".  Any edits
  309.  
  310.             that are performed against this UserDatabase are immediately
  311.  
  312.             available for use by the Realm.  -->
  313.  
  314.         <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
  315.  
  316.               resourceName="UserDatabase"/>
  317.  
  318.       </Realm>
  319.  
  320.  
  321.  
  322.       <Host name="localhost"  appBase="webapps"
  323.  
  324.            unpackWARs="true" autoDeploy="true">
  325.  
  326.  
  327.  
  328.         <!-- SingleSignOn valve, share authentication between web applications
  329.  
  330.             Documentation at: /docs/config/valve.html -->
  331.  
  332.         <!--
  333.  
  334.        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
  335.  
  336.        -->
  337.  
  338.  
  339.  
  340.         <!-- Access log processes all example.
  341.  
  342.             Documentation at: /docs/config/valve.html
  343.  
  344.             Note: The pattern used is equivalent to using pattern="common" -->
  345.  
  346.         <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
  347.  
  348.               prefix="localhost_access_log" suffix=".txt"
  349.  
  350.               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
  351.  
  352.  
  353.  
  354.       </Host>
  355.  
  356.     </Engine>
  357.  
  358.   </Service>
  359.  
  360. </Server>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement