From 486ce78009e86e8ff2e145510bbb5f0b31b273f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Wed, 20 May 2026 07:30:29 +0200 Subject: [PATCH] docs: clarify htaccess.RewriteBase is a backend path, not public URL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous description implied the value should mirror the public URL, causing users behind a reverse proxy to misconfigure the setting and hit infinite redirect loops. The value is an Apache RewriteBase directive and must reflect where Nextcloud is served on the backend (relative to DocumentRoot), not the public-facing URL prefix. Split into "Direct setup" and "Reverse proxy" sections with a concrete example of each, and added a matching note in the Pretty URLs section of the source installation guide. Fixes #13428 Signed-off-by: John Molakvoæ (skjnldsv) --- admin_manual/installation/source_installation.rst | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/admin_manual/installation/source_installation.rst b/admin_manual/installation/source_installation.rst index 601686f18ba..2b7784d9840 100644 --- a/admin_manual/installation/source_installation.rst +++ b/admin_manual/installation/source_installation.rst @@ -191,8 +191,18 @@ if your setup is available on ``https://example.org/nextcloud`` or:: 'overwrite.cli.url' => 'https://example.org/', 'htaccess.RewriteBase' => '/', -if it isn't installed in a subfolder. Finally run this occ-command to update -your .htaccess file:: +if it isn't installed in a subfolder. + +.. note:: + + ``htaccess.RewriteBase`` must match the path relative to Apache's DocumentRoot + where Nextcloud is served on the backend, not the public URL prefix. In a direct + Apache setup these are identical. Behind a reverse proxy that strips the URL + prefix — for example ``https://domain.com/nextcloud/`` forwarded to + ``http://localhost:8080/`` — the correct value is ``/`` even though the public + URL contains ``/nextcloud``. + +Finally run this occ-command to update your ``.htaccess`` file:: sudo -E -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess