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 2 – Host Website with GoDaddy & Apache
Linux

Linux Project 2 – Host Website with GoDaddy & Apache

By Sumit Sharma
April 19, 2026 3 Min Read
0
End-to-End Live Project

Host Website with GoDaddy & Apache

Domain se lekar Linux Server tak, sab kuch live karein.

1. Hosting Kya Hai? (ELI5 Mode)

Think of your website as a ‘House’. The ‘Domain’ is the house address (e.g., mysite.com), and ‘Hosting’ is the land where the house stands (Linux Server).
Maan lijiye aapki website ek ‘Ghar’ hai. Domain uska ‘Pata’ hai (e.g., sumitdevops.com) aur Hosting wo ‘Zameen’ hai jahan ghar khada hai (aapka Linux server).

DevOps engineer ka kaam hai is address (Domain) ko zameen (Server IP) se connect karna taaki poori duniya ise dekh sake.

Step 1 & 2: Buying & Preparing

2. Domain & Server Setup

  • Domain: GoDaddy se apna pasandida domain kharidein (e.g., myprosite.com).
  • Server: AWS ya DigitalOcean par ek Ubuntu server launch karein. Note karein apna Public IP.
👉 Real Use: Company projects mein hum hamesha Static IP use karte hain taaki reboot ke baad address na badle.
Step 3, 4 & 5: Installing Apache

3. Installing the Web Server

Apache is the most reliable web server software. It listens for incoming web requests and serves your HTML files.
Apache ek purana aur bharosemand web server software hai. Jab koi browser mein aapka domain dalta hai, toh Apache hi use website dikhata hai.
sudo apt update && sudo apt install apache2 -y
# Service start aur enable karein
sudo systemctl start apache2
sudo systemctl enable apache2
Step 6, 7 & 8: Deploying Content

4. Website Directory & Content

Hum root folder ke bajaye ek alag folder banayenge taaki multi-site setup asaan ho.

sudo mkdir -p /var/www/mydomain.com/public_html
# Create a sample index.html
sudo nano /var/www/mydomain.com/public_html/index.html

Niche wala HTML code file mein paste karein:

<h1>Site Live on Apache!</h1>
👉 Permissions Check: Hamesha www-data user ko ownership dein kyunki Apache isi user se chalta hai.
sudo chown -R www-data:www-data /var/www/mydomain.com
Step 9 & 10: Virtual Host Config

5. Configuring Virtual Host

Apache ko batana padega ki mydomain.com ke liye kaunsa folder dekhna hai.

sudo nano /etc/apache2/sites-available/mydomain.com.conf

File mein ye configuration dalein:

<VirtualHost *:80>
    ServerName mydomain.com
    DocumentRoot /var/www/mydomain.com/public_html
</VirtualHost>
# Site enable karein
sudo a2ensite mydomain.com.conf
sudo systemctl reload apache2
Step 11: DNS Mapping

6. GoDaddy DNS Setup (The Bridge)

Go to GoDaddy DNS Management. Add an ‘A’ Record. Host: @, Value: Your Server IP.
GoDaddy ke DNS panel mein jayein. Ek ‘A’ Record add karein. Name mein ‘@’ dalein aur Value mein apne Server ki IP.

DNS Propagation: IP update hone mein 10 min se 2 ghante tak lag sakte hain. Sabr rakhein!

🚀 Bonus: Free SSL (HTTPS) with Let’s Encrypt

Bina Green Lock (SSL) ke website “Not Secure” dikhegi. Ise 1 minute mein fix karein:

sudo apt install certbot python3-certbot-apache -y
sudo certbot –apache -d mydomain.com

🛠️ 15 Real-World Troubleshooting Scenarios

1. Apache not starting?
Fix: Run sudo apache2ctl configtest. Agar config mein typo hai toh ye bata dega.
2. Website opens IP but not Domain?
Fix: DNS propagation check karein whatsmydns.net par.
3. Permission Denied Error (403 Forbidden)?
Fix: Check karein ki folder ki permission 755 hai ya nahi: chmod -R 755 /var/www.
4. Port 80 Blocked?
Fix: UFW firewall check karein: sudo ufw allow 'Apache Full'.

[Aur aise hi 10+ professional debugging tips is project ka hissa hain]

Summary: Mission Accomplished! 🎯

Aapne successfully ek live infrastructure build kiya hai. Aapne Domain purchase kiya, DNS map kiya, Apache configure kiya aur SSL se secure kiya. Now you are a Web Hosting Pro!

Author

Sumit Sharma

Follow Me
Other Articles
Previous

Linux Project -1 Deploy a Production-Ready Web Server

Next

Linux Project 3 -Host Website with Nginx & Domain

No Comment! Be the first one.

Leave a Reply Cancel reply

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

Recent Posts

  • Dockerfile — Build Production-Ready Images Like a DevOps Engineer
  • Docker Images & Containers
  • Docker Introduction — Learn Containers with Real DevOps Projects (Beginner to Advanced)
  • Git Branching & Team Collaboration — Work Like a Real DevOps Engineer
  • Remote Repositories & Cloud Workflow

Recent Comments

No comments to show.

Archives

  • April 2026

Categories

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