1

I am new to AWS and learning through hands on labs. As per the instructions in the lab, I launched an EC2 instance, installed apache and displayed a simple index.html file when the instance IP was accessed. This worked great and when I was done for the day I stopped the instance. Now when I select the instance, go to Actions > Instance State > Start it shows me that the instance is running but when I enter the IP address in the browser I get an error message that says:

This page isn’t working

[IP ADDRESS] didn’t send any data.

ERR_EMPTY_RESPONSE

Why is this happening when I have not changed anything else in the instance? How can I get it to work and show the index.html file again? I see no errors in the AWS console. I tried creating a new instance, which worked, stopped it and started again and faced the same problem.

  • Does this answer your question? [An IP address of EC2 instance gets changed after the restart](https://stackoverflow.com/questions/55414302/an-ip-address-of-ec2-instance-gets-changed-after-the-restart) – rocketman Aug 19 '20 at 04:20

1 Answers1

1

Based on the comments.

The issue was that apache was not starting automatically after instance re-start.

The solution was to enable the automate start of the web server.

Marcin
  • 215,873
  • 14
  • 235
  • 294
  • But in the instance description I still see an IPv4 Public IP address associated with it. Why did this not change? How can I find the new IP address that was allocated to my instance? – jollypiraterum Aug 19 '20 at 04:23
  • @jollypiraterum You can check in console, like in the updated answer. – Marcin Aug 19 '20 at 04:26
  • I get the exact same issue when I enter the new IP address. – jollypiraterum Aug 19 '20 at 04:32
  • @jollypiraterum So your apache must be down. Is it running after the restart? – Marcin Aug 19 '20 at 04:32
  • I'm not too worried about keeping the same IP address for now. I'm ok if it changes with every stop - start. But why isn't the new IP address working? – jollypiraterum Aug 19 '20 at 04:34
  • 1
    @jollypiraterum You need to provide exact details of how you setup your website. My guess is that its apache or nginx server did not start after the instance was started. You can update the question with exact steps taken to install the server. Is it set to start automatically after instance boot? – Marcin Aug 19 '20 at 04:36
  • 1
    Ah yes, this was the issue. I assumed apache would start on its own. Thanks! – jollypiraterum Aug 19 '20 at 04:41