简体   繁体   中英

Multiple Tomcat 8 Installs or Virtual Hosting

In the past when a new webapp or set of services was to be deployed, it was common practice to be given a new vm with tomcat installed on to deploy to. With my current position the client is only giving me one linux instance to deploy several webapps to. (Small internal usage, 0 scaling. Deploying to a single AWS EC2 linux machine)

The applications are required to be given unique domains. ie app1 and app2 could be mapped to smallapp1.com:8080/app1/login and smallerapp2.com:8080/app2/login (ports are for example only and not a requirement)

I currently have two installations of tomcat8 running on the instance and each application is deployed to a unique tomcat install and running on different ports. (one is 8080 and the other 8081).

If I were to want to deploy a handful of other small applications would I be better off using individual tomcat installations or should I be using Virtual Hosting?

I am new to deployment. In the past I was handed a deployment destination and procedure. In the new position I was simply given credentials to a single instance. I am not sure what is better practice or in which situation which is better than another. If it matters, each application is only ever going to be used by a maximum of 20 users at the same time.

TL;DR Using multiple installations of tomcat on the same instance or using the same tomcat installation to host multiple applications.

Virtualhosts is a better option because you are not bloating the server with several installations that could conflict with each other, and you are to take 1 port for each instance of tomcat.

Keep in mind that tomcat is a better solution for Java web applications, if you are not running servlets or JSPs you are better off using Apache Http server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM