How to configure multiple Tomcat applications

Source: Internet
Author: User

Copy codeThe Code is as follows: <? 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
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 may not use this file except T in compliance
The License. You may obtain a copy of the License

Http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
Distributed under the License is distributed on an "as is" BASIS,
Without warranties or conditions 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 you may not
Define subcomponents such as "Valves" at this level.
Documentation at/docs/config/server.html
-->
<Server port = "8005" shutdown = "SHUTDOWN">

<! -- APR library loader. Documentation at/docs/apr.html -->
<Listener className = "org. apache. catalina. core. AprLifecycleListener" SSLEngine = "on"/>
<! -- Initialize Jasper prior to webapps are loaded. Documentation at/docs/jasper-howto.html -->
<Listener className = "org. apache. catalina. core. JasperListener"/>
<! -- JMX Support for the Tomcat server. Documentation at/docs/non-existent.html -->
<Listener className = "org. apache. catalina. mbeans. ServerLifecycleListener"/>
<Listener className = "org. apache. catalina. mbeans. GlobalResourcesLifecycleListener"/>

<! -- Global JNDI resources
Documentation at/docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<! -- Editable user database that can also be used
UserDatabaseRealm to authenticate users
-->
<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"/>
</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 already ed
And responses are returned. Documentation:
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 8080
-->
<Connector server = "mws" address = "127.0.0.1" port = "80" maxHttpHeaderSize = "8192" maxThreads = "1024"
EnableLookups = "false" redirectPort = "8443" acceptCount = "100"
ConnectionTimeout = "20000" disableUploadTimeout = "true"
Compression = "on" compressableMimeType = "text/html, text/xml, text/plain" bufferSize = "10240" URIEncoding = "GBK"/>
<! -- A "Connector" using the shared thread pool -->
<! --
<Connector executor = "tomcatThreadPool"
Port = "8080" protocol = "HTTP/1.1"
ConnectionTimeout = "20000"
RedirectPort = "8443" type = "regxph" text = "yourobjectname"/>
-->
<! -- Define a ssl http/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR,
Connector shocould be using the OpenSSL style configuration
Described in the APR documentation -->
<! --
<Connector port = "8443" protocol = "HTTP/1.1" SSLEnabled = "true"
MaxThreads = "150" scheme = "https" secure = "true"
ClientAuth = "false" sslProtocol = "TLS"/>
-->

<! -- An Engine represents the entry point (within Catalina) that processes
Every request. The Engine implementation for Tomcat stand alone
Analyzes the HTTP headers encoded with the request, and passes them
On to the appropriate Host (virtual host ).
Documentation at/docs/config/engine.html -->

<! -- You shoshould 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:
/Docs/cluster-howto.html (simple how)
/Docs/config/cluster.html (reference documentation) -->
<! --
<Cluster className = "org. apache. catalina. ha. tcp. SimpleTcpCluster"/>
-->

<! -- The request dumper valve dumps useful debugging information about
The request and response data were ed and sent by Tomcat.
Documentation at:/docs/config/valve.html -->
<! --
<Valve className = "org. apache. catalina. valves. RequestDumperValve"/>
-->

<! -- This Realm uses the UserDatabase configured in the global JNDI
Resources under the key "UserDatabase". Any edits
That are saved med against this UserDatabase are immediately
Available for use by the Realm. -->
<Realm className = "org. apache. catalina. realm. UserDatabaseRealm"
ResourceName = "UserDatabase"/>

<! -- Define the default virtual host
Note: The XML Schema validation will not work with Xerces 2.2.
-->
<Host name = "news.sososteel.com" appBase = ""
UnpackWARs = "true" autoDeploy = "true"
XmlValidation = "false" xmlNamespaceAware = "false">
<Context path = "" docBase = "/export/wwwroot/news.sososteel.com" debug = "0">
</Context>
</Host>
<Host name = "market.sososteel.com" appBase = ""
UnpackWARs = "true" autoDeploy = "true"
XmlValidation = "false" xmlNamespaceAware = "false">
<Context path = "" docBase = "/export/wwwroot/market.sososteel.com" debug = "0">
</Context>
</Host>
<Host name = "baike.sososteel.com" appBase = ""
UnpackWARs = "true" autoDeploy = "true"
XmlValidation = "false" xmlNamespaceAware = "false">
<Context path = "" docBase = "/export/wwwroot/mongoke.sososteel.com" debug = "0">
</Context>
</Host>
<Host name = "www.sososteel.com" appBase = ""
UnpackWARs = "true" autoDeploy = "true"
XmlValidation = "false" xmlNamespaceAware = "false">
<Context path = "" docBase = "/export/wwwroot/www.sososteel.com" debug = "0">
</Context>
</Host>
<Host name = "user.service.sososteel.com" appBase = ""
UnpackWARs = "true" autoDeploy = "true"
XmlValidation = "false" xmlNamespaceAware = "false">
<Context path = "" docBase = "/export/wwwroot/user.service.sososteel.com" debug = "0">
</Context>
</Host>
<Host name = "www.steelphone.com" appBase = ""
UnpackWARs = "true" autoDeploy = "true"
XmlValidation = "false" xmlNamespaceAware = "false">
<Context path = "" docBase = "/export/wwwroot/www.steelphone.com" debug = "0">
</Context>
</Host>

</Engine>
</Service>
</Server>

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.