From 94edf5f6717bb5a6ebec8ab15b97c8191cf52182 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 5 Nov 2023 19:42:40 +0100 Subject: [PATCH] update some details in the RP docs Signed-off-by: Simon L --- reverse-proxy.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index 3873ab9a..0fc53374 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -25,12 +25,12 @@ Of course you need to modify `` to the domain on which you want For this setup, the default sample configurations with `localhost:$APACHE_PORT` 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`.
+For this setup, you can use as target `host.docker.internal:$APACHE_PORT` instead of `localhost:$APACHE_PORT`. **⚠️ Important:** In order to make this work on Docker for Linux, you need to add `--add-host=host.docker.internal:host-gateway` to the docker run command of your reverse proxy container or `extra_hosts: ["host.docker.internal:host-gateway"]` in docker compose (it works on Docker Desktop by default).
Another option and actually the recommended way in this case is to use `--network host` option (or `network_mode: host` for docker-compose) as setting 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 that point at `localhost:$APACHE_PORT` should work without having to modify them. **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.server:$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). +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 (the commands only work on Linux). ### Apache