Nginx for Beginners

  1. What Is Nginx?



  2. How Nginx Works?



  3. Basic Nginx Server Block (Virtual Host)



  4. Serving Static Files



  5. Nginx as a Reverse Proxy (for Flask, Django, Node.js, etc.)



  6. Enabling HTTPS with Nginx



  7. Common Nginx Commands



  8. Nginx Logging



  9. Nginx Security Basics




Difference Between Nginx Main Config and Server Config

  1. Overview



  2. What Is the Main Configuration?



  3. What Is the Server Configuration?



  4. Relationship Between Main Config and Server Config



  5. Key Differences at a Glance

  6. Main Config Server Config
    Global Nginx settings Settings for a single website or application
    Located in /etc/nginx/nginx.conf Located in sites-available/ and sites-enabled/
    Defines worker processes, events, global http behavior Defines domains, paths, proxies, SSL, routing
    Affects entire Nginx instance Affects only that specific server block
    Rarely changed once set Frequently edited when adding domains or apps


  7. When to Use Main Config



  8. When to Use Server Config



  9. Example Comparison




Serving a Smallest App Using Nginx — Workflow

  1. Overview



  2. Step 1 — Install Nginx



  3. Step 2 — Create the Smallest Possible Web App



  4. Step 3 — Create a Simple Nginx Server Block



  5. Step 4 — Access the Application



  6. Step 5 — Optional: Use a Custom Domain (Local Testing)



  7. Step 6 — Understand the Minimal Workflow



  8. Step 7 — Optional Extensions




Deploying a Frontend + Backend App Using Nginx

  1. Overview



  2. Project Structure Example



  3. Step 1: Create a Simple Frontend



  4. Step 2: Create a Simple Backend API



  5. Step 3: Write the Nginx Configuration File



  6. Step 4: Build the Dockerfile for the Frontend + Nginx



  7. Step 5: Write a Dockerfile for the Backend



  8. Step 6: Use Docker Compose to Link Everything



  9. Step 7: Run Everything