Search code examples
amazon-web-servicesamazon-ec2elastic-ip

Site refused to connect


I have a site hosted on AWS EC2 instance. I stopped the instance and started it up again and noticed the IP address had changed. Due to complications with this happening posts I read online suggested using an elastic IP. I allocated one and associated it with my EC2 instance. I also made sure that my hosted zone is pointing to my elastic IP. Now when I try to go to my domain I get the error "[site] refused to connect". I am able to ssh into my instance via terminal using the elastic IP. I am lost on where to go next. Any advice would be greatly appreciated. Thank you in advance!


Solution

  • Thanks to @strongjz I have the answer to the question. Hopefully this will help someone else in the future. Once you stop an amazon EC2 instance, not only do you need to check your IP address as it will change but also make sure to ssh into your instance and run sudo service httpd start to make sure that your web server is running. This was the problem for me. Took me days to figure it out. Big thanks to @strongjz for helping me with this!