0

I got two EC2 instances, A and B

  • A is an Apache PHP (LAMP) and B is a Apache Solr
  • Both instances shares same Security Group
  • How to make it so that instance B is accessible via localhost in instance A, e.g: localhost:8985 is instance B in A

Ideas to achieve this?

Victor Zakharov
  • 25,801
  • 18
  • 85
  • 151

2 Answers2

0

By default, instances in the same security group cannot access each other. You can grant access to another security group instead of just an ip range. So to provide access between instances, all you need to do is provide access to the group itself.

datasage
  • 19,153
  • 2
  • 48
  • 54
0

To connect instance A to instance B you need to use the IP address, not localhost. If you really want to connect from A to B using localhost on A you need to set up some sort of tunneling, like stunnel or ssh. There's no real advantage to that though so just connect directly instead.

Lars Hansson
  • 366
  • 1
  • 3