anchor.diff:    See the License for the specific language governing permissions and
     limitations under the License.
   -->
  -<!-- Note:  A "Server" is not itself a "Container", so you may not
  -     define subcomponents such as "Valves" at this level.
  -     Documentation at /docs/config/server.html
  - -->
   <Server port="8006" shutdown="SHUTDOWN">
  -    <!-- Security listener. Documentation at /docs/config/listeners.html
  -    <Listener className="org.apache.catalina.security.SecurityListener" />
  -    -->
  -    <!--APR library loader. Documentation at /docs/apr.html -->
  -    <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  -    <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  +   <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
       <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
       <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  -    <!--Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /-->
   
  -    <!-- Global JNDI resources
  -         Documentation at /docs/jndi-resources-howto.html
  -    -->
       <GlobalNamingResources>
  -        <!-- Editable user database that can also be used by
  -             UserDatabaseRealm to authenticate users
  -        -->
           <Resource name="UserDatabase" auth="Container"
                     type="org.apache.catalina.UserDatabase"
                     description="User database that can be updated and saved"
  
positive.code:                   pathname="conf/tomcat-users.xml" />
      </GlobalNamingResources>
  
      <!-- A "Service" is a collection of one or more "Connectors" that share
           a single "Container" Note:  A "Service" is not itself a "Container",
           so you may not define subcomponents such as "Valves" at this level.
           Documentation at /docs/config/service.html
       -->
      <Service name="Catalina">
  
          <!--The connectors can use a shared executor, you can define one or more named thread pools-->
          <!--
          <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
              maxThreads="150" minSpareThreads="4"/>
          -->
  
  
          <!-- A "Connector" represents an endpoint by which requests are received
               and responses are returned. Documentation at :
               Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
               Java AJP  Connector: /docs/config/ajp.html
               APR (HTTP/AJP) Connector: /docs/apr.html
               Define a non-SSL HTTP/1.1 Connector on port 7990
  
               If you change this port, you have to update scripts.cfg as well
               to have the same port configuration.
          -->
          <Connector port="<%= @tomcat_port %>" protocol="HTTP/1.1"
                     connectionTimeout="20000"
                     useBodyEncodingForURI="true"
  
negative.code:                   unpackWARs="true" autoDeploy="true"
                    xmlValidation="false" xmlNamespaceAware="false">
  
                  <Context docBase="${catalina.home}/atlassian-stash"
                           path="<%= @context_path %>"
                           reloadable="false"
                           useHttpOnly="true"/>
  
              </Host>
          </Engine>
      </Service>
  