Home/Blog/Web Servers & Hosting
Web Servers & Hosting⚡ Beginner Friendly
11 min read
September 28, 2026

Complete Guide to Nginx Reverse Proxy with Automated Let's Encrypt SSL on VPS

Technical Blueprint & Architecture Summary
Target EnvironmentUbuntu 24.04 / Debian 12
Hardware Reqs1 vCPU • 1GB RAM • NVMe
Verification Status Production Tested
🔒
Marcus Sterling
Security Operations Director
#Nginx#Reverse Proxy#SSL#Certbot#Web Hosting

Why Use a Reverse Proxy?

When hosting web applications built with Node.js, Next.js, Python FastAPI, or Docker containers, directly binding app processes to port 80/443 exposes your application layer to raw connection floods.

A hardened Nginx reverse proxy acts as an intelligent intermediary that:

  • Terminates SSL/TLS certificates efficiently.
  • Buffers slow client uploads.
  • Compresses assets using gzip/Brotli.
  • Distributes traffic to internal ports (`localhost:3000`, `localhost:8080`).

  • Step 1: Install Nginx & Certbot

    bash terminal
    sudo apt update
    sudo apt install -y nginx certbot python3-certbot-nginx

    Verify that Nginx is active:

    bash terminal
    sudo systemctl enable --now nginx

    Step 2: Configure Server Block

    Create a configuration file for your domain at `/etc/nginx/sites-available/edufwesh.conf`:

    nginx terminal
    server {
        listen 80;
        listen [::]:80;
        server_name edufwesh.com.ng www.edufwesh.com.ng;
    
        location / {
            proxy_pass http://127.0.0.1:3000;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection 'upgrade';
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_cache_bypass $http_upgrade;
    
            proxy_connect_timeout 60s;
            proxy_send_timeout 60s;
            proxy_read_timeout 60s;
        }
    }

    Enable the site and test configuration:

    bash terminal
    sudo ln -s /etc/nginx/sites-available/edufwesh.conf /etc/nginx/sites-enabled/
    sudo nginx -t
    sudo systemctl reload nginx

    Step 3: Obtain Automated Free SSL via Certbot

    bash terminal
    sudo certbot --nginx -d edufwesh.com.ng -d www.edufwesh.com.ng --non-interactive --agree-tos -m edufwesh@gmail.com --redirect

    Certbot will automatically modify your Nginx configuration, bind TLS 1.3 certificates, and enable automatic 301 redirects from HTTP to HTTPS!

    Verify automatic renewal:

    bash terminal
    sudo certbot renew --dry-run

    Deploy On Edutechz NVMe Cloud

    Need clean IP addresses, DDoS mitigation, and 10 Gbps uplinks to run your proxies, containers, or Windows servers? Deploy your instance in 60 seconds.

    Explore Cloud Plans

    Recommended Technical Guides

    Networking & Privacy

    How to Set Up a High-Performance MTProto Proxy on Ubuntu 24.04 LTS

    9 min read
    Windows RDP

    Step-by-Step Windows RDP Optimization for High-Latency Connections

    8 min read
    Cybersecurity

    Best Practices for Securing Linux Cloud Servers Against Brute-Force Attacks

    10 min read