0

I am running two webserver on tomcat version 9 using port 8080 and 7070 on same EC2 . 1st tomcat :

<Connector port="7070" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

2nd tomcat:

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

I have added this EC2 on loadblancer with port 8080 and 7070 but not able to run server without opening this port in security group. As security purpose we can't open these ports for all so please suggest another way around so that I can run these servers securily.

1 Answers1

1

Generally your load balancer has a public IP address and your EC2 instances have only private IP addresses. Make sure they're in different security groups. The EC2 security group can whitelist ingress from the load balancer security group on required ports, but the EC2 instances are not available on the internet.

Technically they don't need to be in separate security groups, but I consider that best practice to make it simpler to define tiers within an application.

Tim
  • 624