Stop Exposing Raw Ports in Production (Nginx — proxy_pass Explained)

Turtle Code
445 views •

In this video, we explore one of the most common mistakes in backend deployments — exposing your application's port directly to the outside world. Instead, we set up an Nginx reverse proxy using Docker and demonstrate exactly how proxy_pass works to keep your app hidden and secure. We build a real working demo with three files: a Python Flask application, an Nginx configuration, and a Docker Compose setup. You'll see live what happens when a client tries to reach your app directly, and how Nginx intercepts that traffic and forwards it internally. ⏱️ Timestamps 0:00 - What is Reverse Proxy 0:40 - Reverse Proxy Demo (Docker,Flask,Nginx) What you'll learn: ◾ What a reverse proxy is and why you need it in production ◾ How Nginx's proxy_pass directive works under the hood ◾ How Docker containers communicate with the host machine using host.docker.internal ◾ Why binding your app to 127.0.0.1 is the right approach ✅ Github https://github.com/turtlecode/Just-Turtle-Code-Youtube/blob/main/reverse%20proxy%20-%20proxy_pass.txt ✅ Free Python Courses https://www.youtube.com/@turtlecode/courses

Keyboard shortcuts

On. Switch them off if they collide with your assistive tools; ? still opens this sheet.

Go to

Press g then the letter.

  • gh Latest
  • gs Sources
  • gm Media
  • gv Videos
  • gp Podcasts
  • gc Calendar
  • gd Decoder
  • gz Dataviz
  • ga Datasets
  • gb Blog
  • gk Markets
  • gj Careers
  • gn Prompt Notebook

On this page

  • / Focus search, where there is one
  • t Back to top
  • ? This list
  • Esc Close