diff --git a/reverse-proxy.md b/reverse-proxy.md index 742e1b71..786685bc 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -159,7 +159,19 @@ location / { proxy_set_header Connection $connection_upgrade; } ``` +and this to the http{...}-section in your nginx.conf: +``` + ## + # Connection header for WebSocket reverse proxy + ## + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } +``` +(otherwise nginx will fail to start with a message saying the variable named connection_upgrade does not exist) + 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. **Please note:** The above 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) when starting the reverse proxy container in order to connect the reverse proxy container to the host network. If that is not an option for you, you can alternatively instead of `localhost` use the ip-address that is displayed after running the following command on the host OS: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'` (the command only works on Linux) **Advice:** You may have a look at [this](https://github.com/nextcloud/all-in-one/discussions/588#discussioncomment-2811152) for a more complete example.