diff --git a/reverse-proxy.md b/reverse-proxy.md index 5cbd341d..a3ba3432 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -21,11 +21,16 @@ In order to run Nextcloud behind a web server or reverse proxy (like Apache, Ngi ### Adaptation of the respective sample configuration Of course you need to modify `` to the domain on which you want to run Nextcloud. Also make sure to adjust the port 11000 to match the chosen `APACHE_PORT`. -_Running the Proxy Manager in a Docker container_
-The below configuration will only work if your reverse proxy is running directly on the host that is running the docker daemon. If the reverse proxy is running in a docker container, you can use the `--network host` option (or `network_mode: host` for docker-compose) to connect the reverse proxy container to the host network. If you are using a firewall on the server, you need to open ports 80 and 443 for the reverse proxy manually. - -_Running the Proxy Manager on the host_
-If that is not an option or not possible for you (like e.g. on Windows or if the reverse proxy is running on a different host), you can alternatively instead of `localhost` use the private ip-address of the host that is running the docker daemon. If you are not sure how to retrieve that, you can run: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'`. If the command returns a public ip-address, use `ip a | grep "scope global" | grep docker0 | awk '{print $2}' | sed 's|/.*||'` instead (the commands only work on Linux). +**Running the Reverse Proxy on the same server, not in a container** +For this setup, the default sample configurations should work. + +**Running the Reverse Proxy in a Docker container on the same server** +For this setup, you can use as target `host.docker.internal:$APACHE_PORT` instead of `localhost:$APACHE_PORT`.
+Another option and actually the recommended way in this case is to use `--network host` option (or `network_mode: host` for docker-compose) for the reverse proxy container to connect it to the host network. If you are using a firewall on the server, you need to open ports 80 and 443 for the reverse proxy manually. By doing so, the default sample configurations should work. + +**Running the Reverse Proxy on a different server (no matter if in container or not)** +For this setup, you need to use as target the private ip-address of the host that shall be running AIO. So e.g. `private.ip.address.of.aio.host:$APACHE_PORT` instead of `localhost:$APACHE_PORT`.
+If you are not sure how to retrieve that, you can run: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'` on the server that shall be running AIO. If the command returns a public ip-address, use `ip a | grep "scope global" | grep docker0 | awk '{print $2}' | sed 's|/.*||'` instead (the commands only work on Linux). ### Apache