I followed https://docs.docker.com/samples/library/nextcloud/ to setup nextcloud using the linked nginx.conf and everything like in that howto.
Unfortunately, when accessing the site, it just displays “502 Bad Gateway” and the nginx container lists an error:
[error] 6#6: *1 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.x, server: , request: "GET / HTTP/1.0", upstream: "fastcgi://172.26.0.2:9000"
For debugging I did two things:
- I opened port 9000 of the nextcloud:fpm container
- I added a busybox container in the same docker network
telnet localhost 9000 from docker host now succeeds.
telnet app 9000 or
telnet 172.26.0.2 9000 from busybox container fails.
(“app” is the docker hostname for the fpm container, 172.26.0.2 is the IP of that container. Ping works.)
Why is fpm accessible from the host network, but not from the very same docker network it resides is?
What can I do to figure it out?
What else do you need to help me?