Skip to content
Advertisement

Multiple application on single PC

I have installed Tomcat server on my server PC with IP 127.0.0.1 One application is running on the server. Let address of the application is: 127.0.0.1:8080/first-project Now if I want to run another application on the same server, address will be: 127.0.0.1:8080/second-project

I want multiple application with multiple addresses like 127.0.0.1, 127.0.0.2

a) Is this possible to have multiple address on single PC?

b) What is the best practice for running multiple server on same server and how to do that?

  1. With different IP address (127.0.0.1, 127.0.0.2)
  2. With same IP address but different port (127.0.0.1:8080, 127.0.0.1:8081)
  3. With same IP different path (127.0.0.1/first, 127.0.0.1/second)

Any resource link will be helpful. Thanks in advance.

Advertisement

Answer

Not an expert of networking, but what I would suggest to you is the following

  1. You can have many application running on the same server, in the same Tomcat Server but you have to set differents ports. Example : http://localhost:8080/ or http://localhost:8082/ or http://localhost:8084/
  2. You can run your applications in Docker. Then you will be able to run your application in an isolated container with its own IP address. With Docker, you can use docker-compose to run many containers
  3. You can run your applications in differents virtual machines. You will be able to configure each virtual machines with their own IP address to interact with your host or from external location.
  4. You can, have multiple IP address on a single network card
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement