502 Bad Gateway Nginx Reverse Proxy 502 Bad Gateway Nginx Reverse Proxy nginx nginx

502 Bad Gateway Nginx Reverse Proxy


I think your networks command is wrong in the first compose file

networks:  webproxy:    external: true

That specifies a network named webproxy that must exist. (Presumably you created it?). However, you don't attach any containers to that network.

The other compose file has

networks:  default:    external:      name: webproxy

Which does the same thing, except that all the containers are attached to the default network automatically. So making the first file match this may clear up your issue (though I haven't looked into what that magic nginx config generator does ;) )