AWS Public DNS not working after Stopping and Starting EC2

amazon-web-servicestimeout

I stopped and started our Dev EC2 instance, I just wanted to test something. Now when I try to access our web app via the new AWS Public DNS I get an error.

Error code: ERR_CONNECTION_TIMED_OUT

Also I notice that in the browser address bar the public DNS I entered changes back to the old Public DNS we had before, even on machines I never accessed the our app from before.

I can access the site if I add a host entry to my local PC with the public IP address.

Any idea what could be causing this?

UPDATE
I tried rebooting and got a 502 bad gateway error but once I restarted the NGINX server it went away but I still get the connection time out.

Best Answer

It was pretty simple in the end. I had to change the site url on my Magento App.

With SQL it's:

UPDATE core_config_data SET value=REPLACE(value,"http://ec2-old-public-ip.eu-west-1.compute.amazonaws.com","http://ec2-new-public-ip.eu-west-1.compute.amazonaws.com/");