docker-port-forward-shadow-debug

Diagnose Docker containers shadowing host ports 80 and 443.

2|Updated May 10, 2026
One-click install
npx skills add https://github.com/freedomw1987/tree_monstor --skill docker-port-forward-shadow-debug
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docker-port-forward-shadow-debug
Source: https://github.com/freedomw1987/tree_monstor/tree/main/skills/debugging/docker-port-forward-shadow-debug
Command: npx skills add https://github.com/freedomw1987/tree_monstor --skill docker-port-forward-shadow-debug

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill resolves the common issue where Docker containers expose ports 80 or 443 to the host, shadowing directly running host services like nginx, which causes reverse proxy traffic to be intercepted by the wrong process, leading to unexpected server response headers, 404 errors, or misrouted API requests.

Core Features & Use Cases

  • Step-by-Step Diagnostic Checklist: Commands to verify actual serving processes via HTTP headers, locate conflicting Docker containers, and identify port mapping configurations.
  • Temporary and Permanent Fix Guidance: Instructions to kill shadow processes for immediate testing and update Docker configurations to eliminate port conflicts long-term.
  • Clarification of Misleading Tool Output: Explains why tools like ss may show incorrect listener information when Docker port forwarding is active.
  • Real-World Use Case: If your nginx reverse proxy returns unexpected server: Caddy headers, this Skill helps you trace the issue to a Docker container running Caddy with a -p 443:443 port mapping.

Quick Start

Use the docker-port-forward-shadow-debug skill to identify and fix Docker containers that are shadowing your host's reverse proxy ports 80 or 443.

Frequently Asked Questions about docker-port-forward-shadow-debug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my nginx reverse proxy return unexpected server headers like Caddy instead of nginx?

Unexpected server headers occur because a Docker container is shadowing your host ports 80 or 443. A Docker container with port mapping like -p 443:443 intercepts reverse proxy traffic before nginx can process it.

How do I diagnose Docker port shadowing intercepting traffic on ports 80 and 443?

Diagnose Docker port shadowing by running step-by-step checks to verify serving processes via HTTP headers, locate conflicting Docker containers, and identify port mapping configurations causing reverse proxy 404 errors.

Why does ss show incorrect listener information when Docker port forwarding is active?

The ss tool shows misleading listener information during Docker port forwarding because Docker manipulates iptables to route traffic directly to containers, bypassing standard host process listener visibility on ports 80 and 443.

How do I fix Docker container port conflicts with host services without disrupting workloads?

Fix Docker port conflicts by killing shadow processes for temporary mitigation, then permanently updating Docker configurations to eliminate port mapping overlaps on ports 80 and 443 without disrupting containerized workloads.

What causes reverse proxy 404 errors and misrouted API requests on host ports 80 or 443?

Reverse proxy 404 errors and misrouted API requests are caused by Docker containers exposing ports 80 or 443 to the host, shadowing directly running host services like nginx and intercepting traffic.