Free browser-based DevOps audit tools โ no signup, nothing leaves your browser
Upstream not responding โ 5 causes and their fixes
localhost instead of the container service name.
Inside a Docker container, localhost refers to the container itself โ not other containers. Use the Docker service name instead.
location / {
proxy_pass http://localhost:3000;
}
location / {
proxy_pass http://app:3000; # "app" = service name in compose
}
Docker containers can only reach each other by service name if they're on the same network. By default, services in the same compose file share a network โ but if nginx is in a separate compose file, you need an explicit shared network.
services:
nginx:
image: nginx
networks:
- webnet
app:
image: myapp
networks:
- webnet
networks:
webnet:
Verify what port your application is actually listening on inside the container:
# Check what ports are open inside the container docker exec -it your_app_container ss -tlnp # Check application logs docker logs your_app_container --tail 50
# Check container status docker ps -a # View crash logs docker logs your_app_container --tail 100 # Restart and watch docker compose up app --force-recreate
Some apps require specific headers to function correctly behind a proxy:
location / {
proxy_pass http://app: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;
}
The Reverse Proxy Mapper detects proxy_pass to localhost, dangling routes, missing SSL redirects, and Traefik v3 breaking changes automatically.
Open Reverse Proxy Mapper โThe service name is the key under services: in your docker-compose.yml. For example, if your compose has services:
backend:
image: myapp, use proxy_pass http://backend:PORT.
Local setups often run nginx directly on the host where localhost works. In production with containerised nginx, localhost refers to the nginx container. Always use service names in Docker environments.
Run docker exec your_nginx_container nginx -t to test the configuration without restarting. If valid, run docker exec your_nginx_container nginx -s reload to apply changes without downtime.
502 means nginx connected to the upstream but received an invalid response (or the connection was refused). 504 means nginx connected but the upstream took too long to respond. 502 is usually a configuration issue; 504 is usually an application performance issue.