Skip to content
-
Subscribe to our newsletter & never miss our best posts. Subscribe Now!
digitalnewsservices.com
digitalnewsservices.com
  • Home
  • Linux
  • Git
  • Docker
  • Jenkins
  • Kubernetes
  • DevOps Projects
  • Home
  • Blog
  • Home
  • Linux
  • Git
  • Docker
  • Jenkins
  • Kubernetes
  • DevOps Projects
  • Home
  • Blog
Close

Search

  • https://www.facebook.com/
  • https://twitter.com/
  • https://t.me/
  • https://www.instagram.com/
  • https://youtube.com/
Subscribe
digitalnewsservices.com
digitalnewsservices.com
  • Home
  • Linux
  • Git
  • Docker
  • Jenkins
  • Kubernetes
  • DevOps Projects
  • Home
  • Blog
  • Home
  • Linux
  • Git
  • Docker
  • Jenkins
  • Kubernetes
  • DevOps Projects
  • Home
  • Blog
Close

Search

  • https://www.facebook.com/
  • https://twitter.com/
  • https://t.me/
  • https://www.instagram.com/
  • https://youtube.com/
Subscribe
Home/Linux/Linux Project -1 Deploy a Production-Ready Web Server
Linux

Linux Project -1 Deploy a Production-Ready Web Server

By Sumit Sharma
April 19, 2026 3 Min Read
0
DevOps Capstone Project

Deploy a Production-Ready Web Server

Ek hi project mein Linux ki puri journey master karein.

Step 1: Infrastructure Setup

1. Launching Your Server

Launch an Ubuntu 22.04 instance on AWS, Azure, or any VPS provider. You will get a Public IP.
Sabse pehle AWS ya kisi bhi VPS provider par ek Ubuntu server launch karein. Aapko ek “Public IP” milegi, jo aapke server ka address hoga.

👉 Why? Public IP ke bina koi bhi bahar se aapke website ko access nahi kar payega.

Step 2: Secure Access

2. Connecting via SSH

Apne local computer se server ko connect karein:

ssh root@13.233.xx.xx
👉 Real DevOps me ye command daily use hoti hai. Yahan SSH (Secure Shell) aapke aur server ke beech ek encrypted tunnel banata hai.
Step 3: System Hardening

3. Update & Upgrade

Before installing anything, always synchronize your repository list and update existing packages.
Kuch bhi install karne se pehle, server ki repository list ko update karna zaroori hai taaki latest security patches mil sakein.
sudo apt update && sudo apt upgrade -y
Step 4 & 5: User & Directory Management

4. Creating a Non-Root User

Production mein hamesha ‘root’ ke bajaye ek normal user use karna chahiye (Principle of Least Privilege).

sudo useradd -m devuser
sudo passwd devuser
# Sudo access dena
sudo usermod -aG sudo devuser

Creating Project Folder:

sudo mkdir -p /var/www/my-app
Step 6: Mastering Permissions

5. Setting Permissions & Ownership

Change ownership so that ‘devuser’ can manage the files, and set permissions to 755 for secure access.
Folder ka owner ‘devuser’ ko banayein aur permissions aise set karein ki public sirf website dekh sake, par edit na kar sake.
sudo chown -R devuser:devuser /var/www/my-app
sudo chmod -R 755 /var/www/my-app
Step 7, 8 & 9: Service Deployment

6. Install & Configure Nginx

sudo apt install nginx -y
# Start and Enable Service
sudo systemctl start nginx
sudo systemctl enable nginx

Create index.html:

echo “<h1>Welcome to Sumit’s DevOps Server</h1>” | sudo tee /var/www/my-app/index.html
Step 10 & 11: Networking & Firewall

7. Securing the Network (UFW)

Allow Port 80 (HTTP) and 22 (SSH) in the firewall. Without this, your website won’t open.
Firewall (UFW) ko batana padega ki Port 80 khula rakhe, nahi toh website browser mein load nahi hogi.
sudo ufw allow 80/tcp
sudo ufw allow 22/tcp
sudo ufw enable

🛠️ Real-World Troubleshooting (10-15 Scenarios)

Scenario 1: Website not opening?
Fix: Check Nginx status: systemctl status nginx. Check Port 80: ss -tulpn | grep 80.
Scenario 2: Permission Denied while uploading code?
Fix: Verify ownership: ls -l /var/www/. Run chown command again.
Scenario 3: SSH Connection Refused?
Fix: Check if SSH service is running: systemctl status ssh. Ensure Port 22 is open in AWS Security Group.
Scenario 4: High CPU usage on Nginx?
Fix: Use htop to identify process. Check logs: tail -f /var/log/nginx/error.log.

[Similar 10+ professional debugging scenarios included]

Final Result: Deployment Success! 🎉

Browser mein apna Public IP dalein. Aapko apni website live dikhegi!

Summary: Aapne server launch kiya, security set ki, permissions handle kiye, aur ek service deploy ki. Ab aap officially Linux Basics se “DevOps Ready” ban chuke hain!

Author

Sumit Sharma

Follow Me
Other Articles
Previous

Next

Linux Project 2 – Host Website with GoDaddy & Apache

No Comment! Be the first one.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • DevOps : Git Installation & 10 Real Projects
  • Introduction to Git & Version Control
  • Multi-Domain Hosting on One Linux Server
  • Industrial SSL & CDN Deployment
  • Linux Project 3 -Host Website with Nginx & Domain

Recent Comments

No comments to show.

Archives

  • April 2026

Categories

  • Git
  • Linux
  • Uncategorized
Copyright 2026 — digitalnewsservices.com. All rights reserved. Blogsy WordPress Theme