My Apache Web Server has stopped responding to external request by itself all of a sudden without any intervention or change in load

0

I had a personal website hosted on apache and it has stopped responding suddenly. Its working on private IP when I do curl from the instance itself. I have re-checked my security policy and it has correct inbound and outbound rules which had been working earlier as well. I want to know if anything has changed in EC2 and do I need to update any settings to allow the inbound traffic. CPU and Memory on the box are all fine and server is up and running as confirmed by curl on private IP and localhost.

Other Info

  • Ping is working fine as ICMP is enabled on the security group.
  • SSH is also working fine but a telnet request to HTTP port is timing out.
  • Their is no custom network acl and security group config is correct and unchanged from when it was working.
  • Their is no firewall on aws nor on the ubuntu box.
  • I am using an elastic IP and my DNS entries point to it only.

Updates

  • I added a new ubuntu server and installed apache on it using same security group and that worked fine.
  • I also removed elastic IP from my instance to try from a dynamic public IP but that also did not work.
2 Answers
1

There might be different reasons for why your web server has stopped responding to external requests. The first step would normally be to check your security groups and policies, but if those are set up correctly and worked earlier you should then check your Network ACLs, load balancer, and gateways.

The most likely solution would be to check you public IP addresses. You should check to see if you have an elastic IP address attached to your Instance. You want your Public IP address to be an elastic IP and not dynamic. If it is dynamic and you stop your instance, your public IP address will change on your instance and ENI upon start.

There are a few other avenues to investigate:

Do you use Elastic Load Balancers? Common issues with load balancer connectivity include:

  • Listener configuration for the port where clients try to connect
  • Load Balancer security group denies traffic for listeners
  • Target security group configuration
  • Network ACL in your VPC blocks traffic that you want to allow (you should check your network traffic)
  • Route table rules are incorrectly blocking or routing requests

Do you connect with a public IP or a domain name?

  • If you use a domain name, check Route 53 or DNS to see if there is a problem with your domain name. You should try using ping or nslookup for this.
  • If you use a public IP, try accessing your server project with http://<your public ip>:<your webserver port>/project name.
  • There are 2 things to check if you use a public IP:
  1. Check if you have an ENI (Network Interface) with your public IP attached to your EC2 Instance. Check if your public IP that you use is Elastic and not auto-assigned.
  2. Check the public IP on AWS and the client side and see if the client side firewall blocks the traffic you want.

Do you use a private subnet?

  • If you do, you would want to use a NAT gateway; otherwise make sure your Internet Gateway is attached to the right VPC.
AWS
answered a year ago
  • The ping works just fine. So I believe its not an elastic IP issue. I have an elastic IP.

    www.atctea.in Elastic IP: 13.127.66.70

    Thanks. I will check on the other suggestions but I am wondering why a working site will suddenly stop without any changes done to it.

0

Is there any change in the public IP address?

Please refer to the following documents for general checklist items.
https://repost.aws/knowledge-center/ec2-instance-hosting-unresponsive-website

profile picture
EXPERT
answered a year ago
  • No, I have been using elastic IP and can SSH to my box using it. I am also able to do the same using my DN.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions