Network & Connectivity
502 Bad Gateway
Nginx is forwarding to wrong container IPs. Get current container IPs:dify/docker/nginx/conf.d:
- Replace
http://api:5001withhttp://172.19.0.7:5001 - Replace
http://web:3000withhttp://172.19.0.5:3000
Cannot access localhost services
Docker containers can’t reach host services via127.0.0.1. Use your machine’s local network IP instead.
Example: For OpenLLM running on host, configure Dify with http://192.168.1.100:port (your actual local IP).
Page loads forever with CORS errors
Domain/URL changes cause cross-origin issues. Update indocker-compose.yml:
CONSOLE_API_URL- Backend URL for console APICONSOLE_WEB_URL- Frontend URL for console webSERVICE_API_URL- Service API URLAPP_API_URL- WebApp API backend URLAPP_WEB_URL- WebApp URL
Mounting & Volumes
Nginx configuration mount failure
Error:Port conflicts
Port 80 already in use? Either:-
Stop the conflicting service (usually Apache/Nginx):
-
Or change port mapping in
docker-compose.yaml:
Container Management
View background shell outputs
List running shells:Container restart issues
After system reboot, containers may fail to connect. Ensure proper startup order:SSRF Proxy
Thessrf_proxy container prevents Server-Side Request Forgery attacks.
Customize proxy rules
Editdocker/volumes/ssrf_proxy/squid.conf to add ACL rules: