AIO - connect to apache in mastercontainer

Hello everybody,

APACHE_PORT is 11000.
I’ve tried both setting APACHE_IP_BINDING to 127.0.0.1 or 0.0.0.0

The AIO mastercontainer seems not being able to connect to the apache container through localhost or 127.0.0.1.
But my host PC is able to connect.

In my Caddyfile, I have tried these:
reverse_proxy localhost:{$APACHE_PORT}
or
reverse_proxy 127.0.0.1:{$APACHE_PORT}
both with no success.
Running nc -z localhost 11000; echo $? in the AIO mastercontainer, returns 1 (=failed).
Running the same from my host PC, returns 0 (=succeeded).

Ok, now the following two approaches, do work:
reverse_proxy nextcloud-aio-apache:{$APACHE_PORT}
or
reverse_proxy 172.20.0.7:{$APACHE_PORT}

(172.20.0.7 is the IP address of the apache container “scope global”)

So the question is,
what am I doing wrong, that the mastercontainer cannot connect apache through 127.0.0.1 nor localhost?
And is it a correct approach, to use “nextcloud-aio-apache” in the Caddyfile? I assume, this is kind of a host name of the apache container?

Thank you very much for any assistance. Much appreciated. Best regards

Hi, can you follow all-in-one/reverse-proxy.md at main · nextcloud/all-in-one · GitHub?

1 Like

Thank you :slight_smile:

reverse_proxy host.docker.internal:{$APACHE_PORT}

instead of localhost or 127.0.0.1, because it is in another container, of course.

(I did try that previously with another config attempt, which failed due to some other reason, and forgot to keep that in mind, sorry)

1 Like