DEV Community

Er. Bhupendra
Er. Bhupendra

Posted on

DAY 1 Setting up EC2 & Nginx

🎯 Day 1 Objective Explained

✅ 1. Launch an EC2 Instance

👉 मतलब: AWS cloud में एक virtual server बनाना

What you do:

  • Go to AWS EC2
  • Launch instance (Ubuntu preferred)
  • Select t2.micro
  • Download .pem key

Why?
👉 This is your server (like your laptop but in cloud)


✅ 2. Configure Security Groups

👉 मतलब: कौन server को access कर सकता है

Important Ports:

  • 22 (SSH) → login करने के लिए
  • 80 (HTTP) → website दिखाने के लिए
  • 443 (HTTPS) → secure website

Example:

Port 22 → Your IP (secure)
Port 80 → 0.0.0.0/0 (public access)
Enter fullscreen mode Exit fullscreen mode

Why?
👉 Without this, browser से access नहीं होगा


✅ 3. Deploy Nginx (Make it Public)

👉 मतलब: server को website server बनाना

Commands:
remember this only four command

sudo apt update
sudo apt install nginx -y
suod systemctl start ngnix
sudo systemctl start nginx
Enter fullscreen mode Exit fullscreen mode

Test:

http://your-public-ip
Enter fullscreen mode Exit fullscreen mode

👉 You will see:
"Welcome to Nginx"


Top comments (0)