
Docker commands
A practical, terminal-focused guide covering everything you need to know about web server deployment, Docker containers, GitHub-based hosting, and Bash automation. 📌 Table of Contents Hosting Apache2 — Traditional Way Hosting Nginx — Traditional Way Multiple Static Sites — Virtual Hosts & Server Blocks Hosting via Docker Clone from GitHub & Host via Docker Bash Scripting — Automate Everything Docker Cheatsheet Key Concepts & Golden Rules 1. Hosting Apache2 — Traditional Way Install Apache2 sudo apt update sudo apt install apache2 -y Start, Enable & Check Status sudo systemctl start apache2 sudo systemctl enable apache2 # auto-start on reboot sudo systemctl status apache2 # check if running Web Root — where your files go /var/www/html/ Deploy your page echo "<h1>My Apache Site</h1>" | sudo tee /var/www/html/index.html Fix Permissions (always do this!) sudo chown -R www-data:www-data /var/www/html/ sudo chmod -R 755 /var/www/html/ Test config & Reload sudo apache2ctl -t # test for syntax
Continue reading on Dev.to Tutorial
Opens in a new tab




