sudo tee /var/www/html/index.html > /dev/null <<'EOF' Greg2 Secure Web App (Apache)
Apache • Static App

Greg2 Secure Web App

A lightweight demo “web app” served by Apache on EC2.

Server time

Status

If you can see this page, your EC2 instance is reachable on HTTP/80.

Web tier: ONLINE
DB tier: PRIVATE (no public IP)

Security controls (what this lab demonstrates)

  • Public subnet routes to an Internet Gateway
  • Private subnet routes outbound via NAT Gateway
  • Security Group allows inbound HTTP/HTTPS only
  • Database inbound restricted to the web security group

Quick client-side check

Click to show what your browser sees.


      

Next step: HTTPS

For TLS, terminate HTTPS on an Application Load Balancer using an ACM certificate, then forward to this instance on HTTP.

Tip: enforce HTTPS with an ALB redirect (80 → 443).

Built for your cloud security lab. No frameworks. Just Apache + HTML/CSS/JS.

EOF