AWS Builder Center
Can't reach your nginx? Check these 3 layers.

Can't reach your nginx? Check these 3 layers.

Web server running but unreachable? A quick outside-in checklist: Security Group, OS firewall (firewalld/ufw), then the app itself, with the exact commands to test each layer.

Engineering Student | Cloud DevOps & SRE Engineer
When a web server is running but the browser can't reach it, the problem is almost always one of three layers. Check them outside in:
  1. Cloud firewall (AWS Security Group): is there an inbound rule for the port (80/443/8080)? Security groups are stateful, so the return traffic is allowed automatically.
  1. OS firewall (firewalld / ufw): the instance can still block the port itself. sudo firewall-cmd --list-ports sudo ufw status With firewalld, add --permanent and reload, or the rule disappears after a reboot.
  1. The app: is nginx actually listening on that port? sudo ss -ltnp | grep nginx curl  http://localhost 
If curl works locally but not from outside, it's a firewall layer. If curl fails locally, it's the app.
Which layer trips you up most?
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article