How to troubleshoot the issue where your public website that is hosted on your Amazon Elastic Cloud compute instance is unresponsive.
Taiwo Amao
Technical Support Engineer @ Moniepoint Group ? DevOps ?? ? Cloud Migration ? 5x AWS ? 2x Azure ? Platform Engineer ? AWS Community Builder ??
A website hosted on EC2 instance can be unreachable for several reasons. Following are some of the common steps to troubleshoot this scenario.?
??????sudo systemctl status httpd
??????if the HTTP service is inactive or stop state and restart the service using the following command.?
??????sudo systemctl restart httpd
When the HTTP service is restarted, confirm its status using the following command.
sudo systemctl status httpd
6. Confirm that traffic is received on port 80 and 443 by running the following command:?
netstat -tunlp | grep -i http
7. Verify the status of OS-level firewall. If the firewall is active, either stop it or allow port 80 and 443. You can review the status of firewall using following command:?
sudo firewall-cmd --state
领英推荐
If the firewall service is running allow HTTP and HTTPS using the following commands:
sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --add-service=https --permanent
sudo firewall-cmd --reload
on Ubuntu or Debian system, use the following command:
sudo ufw status verbose
If UFW (Uncomplicated firewall) is running on Ubuntu instance, then allow HTTP and HTTPS using the following command.
sudo ufw allow in 80/tcp
sudo ufw allow 443/tcp
sudo ufw status verbose
Finally, review the error and access log under \var\log\httpd. Then relaunch public website address to confirm if issue has been resolved.
Cloud Infrastructure Engineer || DevOps Engineer || Technical Support Engineer
2 年??
Shift-Left Advocate | Driving Zero-Defect Quality from Requirements to Release | Automation | Agile | API | Cloud | Data | ETL | AI | Digital Payments | Healthcare | Cloud | CI/CD pipelines
2 年??