Tomcat Multi-instance configuration

Source: Internet
Author: User

Introduction: Tomcat can access http://ip:8080 after the default installation is complete, if the page appears. If you want to run more than one tomcat on a server, how do I set it up?


Method:

Re-copy the Cp-r tomcat tomcat2 from the directory where Tomcat is installed, and then go to conf/server.xml change profile in the TOMCAT2 directory

The following is the default configuration file,

<server port= "8005" shutdown= "Shutdown" > ... <connector connectiontimeout= "20000" port= "8080" Protocol= "Org.apache.coyote.http11.Http11NioProtocol" redirectport= "8443"/> <connector port= "8009" prot Ocol= "ajp/1.3" redirectport= "8443"/></server>

Because once a port is bound, other processes can no longer bind, so we modify these ports to other values. Modify the Server.xml file, configure server port =8105,connector port = 8181,AJP Port = 8109,rediretport=81443 The following is the changed

<server port= "8105" shutdown= "Shutdown" > ... <connector connectiontimeout= "20000" port= "8181" Protocol= "Org.apache.coyote.http11.Http11NioProtocol" redirectport= "81443"/> <connector port= "8109" PR Otocol= "ajp/1.3" redirectport= "81443"/></server>

Finally enter into the tomcat2/bin/./startup.sh to start the service can be

To see if the port is started

NETSTAT-LNP | grep 8105

Verify:

I visit: http://192.168.234.128:8080 and http://192.168.234.128:8081


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/85/25/wKiom1ea9_vSNhYqAADQI4GrIw4270.png "style=" float: none; "title=" 1.png "alt=" Wkiom1ea9_vsnhyqaadqi4griw4270.png "/>



650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/85/25/wKioL1ea9_uy2cJEAAA6xkBRv00321.png "style=" float: none; "title=" 2.png "alt=" Wkiol1ea9_uy2cjeaaa6xkbrv00321.png "/>



If more instances are needed, copy the program directory in turn and modify the port of the configuration file.


This article is from the "Drifting Away" blog, make sure to keep this source http://825536458.blog.51cto.com/4417836/1831701

Tomcat Multi-instance configuration

Related Article

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.