Skip to content

Commit c54f52e

Browse files
skjnldsvbackportbot[bot]
authored andcommitted
docs: clarify htaccess.RewriteBase is a backend path, not public URL
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) <skjnldsv@protonmail.com>
1 parent 9990611 commit c54f52e

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

admin_manual/installation/source_installation.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,18 @@ if your setup is available on ``https://example.org/nextcloud`` or::
172172
'overwrite.cli.url' => 'https://example.org/',
173173
'htaccess.RewriteBase' => '/',
174174

175-
if it isn't installed in a subfolder. Finally run this occ-command to update
176-
your .htaccess file::
175+
if it isn't installed in a subfolder.
176+
177+
.. note::
178+
179+
``htaccess.RewriteBase`` must match the path relative to Apache's DocumentRoot
180+
where Nextcloud is served on the backend, not the public URL prefix. In a direct
181+
Apache setup these are identical. Behind a reverse proxy that strips the URL
182+
prefix — for example ``https://domain.com/nextcloud/`` forwarded to
183+
``http://localhost:8080/`` — the correct value is ``/`` even though the public
184+
URL contains ``/nextcloud``.
185+
186+
Finally run this occ-command to update your ``.htaccess`` file::
177187

178188
sudo -E -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess
179189

0 commit comments

Comments
 (0)