0

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?

  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)
1
  • Since this is obviously a development setup (which is off topic here) this is up to your preference. Oct 31 '21 at 7:28
1

Is this possible to have multiple address on single PC?

You can use the whole 127.0.0.0/8 network locally.
This means all addresses from 127.0.0.1 to 127.255.255.254 are at your disposal.

What is the best practice for running multiple server on same server?

  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 of these is valid, it totally depends on application architecture/design.
The address would not be accessible remotely anyway, so it's up to you

Not the answer you're looking for? Browse other questions tagged or ask your own question.