From 758bc8b3ff9ebf813b9b3b76766a0803856f093d Mon Sep 17 00:00:00 2001 From: Verhoeckx <64807887+Verhoeckx@users.noreply.github.com> Date: Sat, 18 Feb 2023 21:43:20 +0100 Subject: [PATCH] Add the directive ProxyPassReverse According to the official documentation of Apache the directive ProxyPassReverse should be added when Apache is being used as a reverse proxy. I have tested it and Nexctloud AIO seems to work just fine. From the documentation: "This directive lets Apache adjust the URL in the Location, Content-Location and URI headers on HTTP redirect responses. This is essential when Apache is used as a reverse proxy (or gateway) to avoid bypassing the reverse proxy because of HTTP redirects on the backend servers which stay behind the reverse proxy." https://httpd.apache.org/docs/2.2/mod/mod_proxy.html#ProxyPassReverse Signed-off-by: Verhoeckx <64807887+Verhoeckx@users.noreply.github.com> --- reverse-proxy.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reverse-proxy.md b/reverse-proxy.md index cbe03385..389505b8 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -48,7 +48,10 @@ Add this as a new Apache site config: RewriteEngine On ProxyPreserveHost On AllowEncodedSlashes NoDecode + ProxyPass / http://localhost:11000/ nocanon + ProxyPassReverse / http://localhost:11000/ + RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteCond %{HTTP:Connection} upgrade [NC] RewriteCond %{THE_REQUEST} "^[a-zA-Z]+ /(.*) HTTP/\d+(\.\d+)?$"