1

I have installed wordpress on my ubuntu16.04 LTS instance of ec2. I was able to connect to it via public DNS. But then I added the Elastic IP to the instance and tried to connect to the instance via my browser but it took a lot of time and the browser ended up saying "This site can’t be reached". I have added security group allowing the port 80 as well. Before adding elsatic IP I was accessing the ec2 instance via public dns with no errors. Is this has to do something with elastic IP.

Thanks in advance.

knkbga
  • 11
  • 2

1 Answers1

0

From your question, it looks like you want to connect to your original instance public IP after associating an Elastic IP to it.

That is not possible: as soon as you associate an Elastic IP to your EC2 instance, the old public IP address is released.

See: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html

Luca Gibelli
  • 2,611
  • 1
  • 21
  • 29
  • Yes after associating new elastic IP, I am trying to connect via new public DNS. But it is not working. Every time I create new instance and when I associate some elastic ip to it. It stops connecting and gives me 504. Now I have created new instance done the same thing again and have not associated any elastic ip. Now it is working. But why am I not able to associate elastic IP is still my question. – knkbga May 01 '18 at 11:20
  • Who returns error 504? Error 504 is "Gateway Timeout Error", it means there is a webserver listening on your Elastic IP which answered to your browser with an error because it cannot connect to the backend server. Are you using ELB or some other reverse proxy? – Luca Gibelli May 01 '18 at 11:48