Multiple tomcat ports correspond to multiple web Applications

Source: Internet
Author: User

If you have more than one tomcat port and need more than one web application instance, see.

The Code is as follows: Copy code

<? Xml version = '1. 0' encoding = 'utf-8'?>

<Server port = "8005" shutdown = "SHUTDOWN">

<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>

<Service name = "Catalina">
<Connector port = "7777" protocol = "HTTP/1.1"
ConnectionTimeout = "20000"
RedirectPort = "8443" type = "regxph" text = "yourobjectname"/>
<Connector port = "8009" protocol = "AJP/1.3" redirectPort = "8443"/>
<Engine name = "Catalina" defaultHost = "localhost">
<Realm className = "org. apache. catalina. realm. UserDatabaseRealm"
ResourceName = "UserDatabase"/>
<Host name = "localhost" appBase = "webapps"
UnpackWARs = "true" autoDeploy = "true"
XmlValidation = "false" xmlNamespaceAware = "false">
</Host>
</Engine>
</Service>

<Service name = "Catalina2">
<Connector port = "8002" protocol = "HTTP/1.1"
ConnectionTimeout = "20000"
RedirectPort = "8444" type = "regxph" text = "yourobjectname"/>
<Connector port = "8010" protocol = "AJP/1.3" redirectPort = "8444" URIEncoding = "UTF-8"/>

<Engine name = "Catalina2" defaultHost = "localhost">
<Realm className = "org. apache. catalina. realm. UserDatabaseRealm"
ResourceName = "UserDatabase"/>
<Host name = "localhost" appBase = "webapps"
UnpackWARs = "true" autoDeploy = "true"
XmlValidation = "false" xmlNamespaceAware = "false">
<Context path = "" docBase = "system"/>

</Host>
</Engine>
</Service>

</Server>

Copy a service again and change the name and port. The test is successful.

Also, the following numbers are required: <Context path = "" docBase = "system"/>

If path is left blank, you can directly enter the URL and port to enter the system reference.

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.