Tomcat Virtual Host Configuration

Source: Internet
Author: User

<?xml version= "1.0" encoding= "UTF-8"?>


<!--Licensed to the Apache software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); You are not a use of this file except in compliance with the License. Obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 unless required by applicable law or AG Reed to in writing, software distributed under the License are distributed on a "as is" BASIS, without warranties OR Condi tions of any KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -


<!--note:a "Server" is not itself A "Container", so that you are not define subcomponents such as "valves" at the This level. Documentation At/docs/config/server.html--


-<server shutdown= "Shutdown" port= "8005" >


<listener classname= "Org.apache.catalina.startup.VersionLoggerListener"/>


<!--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"/>


<!--Initialize Jasper prior to WebApps is loaded. Documentation At/docs/jasper-howto.html--



<listener classname= "Org.apache.catalina.core.JasperListener"/>


<!--Prevent memory leaks due to use of particular Java/javax apis-->



<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 is used by Userdatabaserealm to authenticate users--



<resource pathname= "Conf/tomcat-users.xml" factory= "Org.apache.catalina.users.MemoryUserDatabaseFactory" description= "User database that can be updated and saved" type= "Org.apache.catalina.UserDatabase" auth= "Container" name= "Userdatabase"/>


</GlobalNamingResources>


<!--a "service" is a collection of one or more "connectors" that share a single "Container" Note:a "service" was not I Tself a "Container", so if you are not define subcomponents such as "valves" at the level. Documentation At/docs/config/service.html--




-<service name= "Catalina" >


<!--the connectors can use a GKFX executor, you can define one or more named thread pools-->



<!--name= "Tomcatthreadpool" nameprefix= "catalina-exec-" maxthreads= "<executor" minsparethreads= "4"/>- -



<!--A "Connector" represents an endpoint by which requests is received and responses are returned. Documentation At:java HTTP Connector:/docs/config/http.html (Blocking & non-blocking) Java AJP Connector:/docs/con Fig/ajp.html APR (HTTP/AJP) Connector:/docs/apr.html Define a Non-ssl http/1.1 Connector on port 8080-



<connector port= "8080" redirectport= "8443" connectiontimeout= "20000" protocol= "http/1.1"/>


<!--A "Connector" using the shared thread pool-->



<!--<connector executor= "Tomcatthreadpool" port= "8080" protocol= "http/1.1" connectiontimeout= "20000" redirectport= "8443"/>--



<!--Define a SSL http/1.1 Connector on port 8443 This Connector uses the BIO implementation that requires the JSSE sty Le configuration. When using the apr/native implementation, the OpenSSL style configuration is required as described in the apr/native docum Entation--



<!--<connector port= "8443" protocol= "Org.apache.coyote.http11.Http11Protocol" maxthreads= "sslenabled=" True "Scheme=" https "secure=" true "Clientauth=" false "sslprotocol=" TLS "/>-



<!--Define an AJP 1.3 Connector on port 8009-



<connector port= "8009" redirectport= "8443" protocol= "ajp/1.3"/>


<!--an Engine represents the entry point (within Catalina) that processes every request. The Engine implementation for Tomcat stand alone analyzes the HTTP headers included with the request, and passes them on t o the appropriate host (virtual host). Documentation At/docs/config/engine.html--



<!--should set Jvmroute to support load-balancing via AJP ie: <engine name= "Catalina" defaulthost= "localhost" Jvmroute= "JVM1" >




-<engine name= "Catalina" defaulthost= "localhost" >


<!--for clustering, please take a look at documentation at:/docs/cluster-howto.html (simple)/docs/config/clust er.html (reference documentation)--



<!--<cluster classname= "Org.apache.catalina.ha.tcp.SimpleTcpCluster"/>--



<!--use the Lockoutrealm to prevent attempts to guess user passwords via a brute-force attack-




-<realm classname= "Org.apache.catalina.realm.LockOutRealm" >


<!--This Realm uses the userdatabase configured in the global JNDI resources under the key "Userdatabase". Any edits that is performed against this userdatabase is immediately available for use by the Realm. -



<realm classname= "Org.apache.catalina.realm.UserDatabaseRealm" resourcename= "Userdatabase"/>


</Realm>



-

<!--path represents the virtual path, docbase indicates that the application path context element needs to be added within the host element-

<context path= "/pc" docbase= "corpcms" debug= "0" privileged= "ture" ></Context>

<!--Singlesignon valve, share authentication between Web applications documentation at:/docs/config/valve.html-- >



<!--<valve classname= "Org.apache.catalina.authenticator.SingleSignOn"/>--



<!--Access log processes all example. Documentation at:/docs/config/valve.html note:the pattern used are equivalent to using pattern= "common"-



<valve classname= "Org.apache.catalina.valves.AccessLogValve" pattern= "%h%l%u%t"%r "%s%b" suffix= ". txt" prefix= " Localhost_access_log. "directory=" Logs "/>


</Host>


</Engine>


</Service>


</Server>


Tomcat Virtual Host Configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.