nginx-proxy: 502 Bad Gateway on Centos 8
Is there something special we have to do to get it running on Centos 8?
I tried to run the basic docker-compose.yaml example from README
version: '2'
services:
nginx-proxy:
image: jwilder/nginx-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
whoami:
image: jwilder/whoami
environment:
- VIRTUAL_HOST=whoami.local
And I got:
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.19.3</center>
</body>
</html>
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 4
- Comments: 15 (4 by maintainers)
I usually create a separate Docker network outside of Docker compose then use it as an external network in the compose file.
then
Repeated in every compose file for services that will be proxied.
Also take a look at https://github.com/buchdag/letsencrypt-nginx-proxy-companion-compose
I did not. I just switched to Traefik.