Reverse Proxy Mental Model Checklist for Nginx and Docker

halfbrain_logo512adminJune 13, 2026
3 lượt xem

Reverse Proxy Mental Model Checklist for Nginx and Docker

A reverse proxy receives public traffic and forwards it to an internal service. This is common for Docker apps, n8n, API services, dashboards and AI automation tools. If you understand reverse proxy flow, many deployment errors become easier to fix.

Core principle

The public user talks to Nginx. Nginx talks to the internal app. The app may run on localhost, Docker network or another port. Your job is to make the domain, SSL, proxy headers and internal port agree.

Checklist

  1. Identify the public domain or subdomain.
  2. Identify the internal app port.
  3. Confirm the app is running locally.
  4. Confirm Nginx server block matches the domain.
  5. Set proxy_pass to the correct internal address.
  6. Preserve host and protocol headers.
  7. Install SSL on the public domain.
  8. Check firewall only exposes public ports.
  9. Read Nginx error log if proxy fails.
  10. Test the app through the public domain.

Where this applies

This model applies to n8n, Node.js apps, Python APIs, internal admin dashboards, Docker Compose stacks and webhook receivers.

Checklist Type Technical Setup
Level Intermediate
Risk Level Medium Risk
Estimated Time 30–60 minutes

When to Use This Checklist

Use this checklist when exposing Docker apps, n8n, APIs or internal services through Nginx and a public domain.

Required Tools

SSH access, Nginx, Docker or local app, domain, SSL, firewall, app port

Before You Start

Know the internal app port before editing Nginx. Do not expose internal service ports publicly unless necessary.

Verification Steps

  1. Public domain loads app.
  2. SSL works.
  3. Internal port is not unnecessarily exposed.
  4. Nginx logs show no proxy error.
  5. Webhook or dashboard works correctly.

Rollback Plan

If proxying fails, restore the previous server block and test the internal app directly on localhost or Docker network before changing Nginx again.

Common Mistakes

  • Wrong internal port.
  • Forgetting proxy headers.
  • Exposing both Nginx and app port publicly.
  • Installing SSL before DNS works.
  • Debugging app code before checking proxy path.

Related Commands

docker ps
curl -I http://127.0.0.1:5678
sudo nginx -t
sudo systemctl reload nginx
sudo tail -n 100 /var/log/nginx/error.log
curl -I https://app.example.com

Share:

Disclaimer: The guides, checklists, commands, and examples on HalfBrain.net are provided for educational and operational reference only. Server environments, hosting providers, software versions, security settings, and WordPress configurations can vary, so you should always review commands before running them on your own system. We do our best to keep the content accurate and useful, but we cannot guarantee that every command, configuration, or recommendation will fit every environment. Always back up your website, database, and server configuration before making changes. HalfBrain.net is not responsible for data loss, downtime, security incidents, misconfiguration, or other issues that may result from applying the information on this website. Use the material at your own discretion.

Leave a Reply

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