Skip to content

Commit 486ce78

Browse files
committed
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 fdf5de2 commit 486ce78

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
@@ -191,8 +191,18 @@ if your setup is available on ``https://example.org/nextcloud`` or::
191191
'overwrite.cli.url' => 'https://example.org/',
192192
'htaccess.RewriteBase' => '/',
193193

194-
if it isn't installed in a subfolder. Finally run this occ-command to update
195-
your .htaccess file::
194+
if it isn't installed in a subfolder.
195+
196+
.. note::
197+
198+
``htaccess.RewriteBase`` must match the path relative to Apache's DocumentRoot
199+
where Nextcloud is served on the backend, not the public URL prefix. In a direct
200+
Apache setup these are identical. Behind a reverse proxy that strips the URL
201+
prefix — for example ``https://domain.com/nextcloud/`` forwarded to
202+
``http://localhost:8080/`` — the correct value is ``/`` even though the public
203+
URL contains ``/nextcloud``.
204+
205+
Finally run this occ-command to update your ``.htaccess`` file::
196206

197207
sudo -E -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess
198208

0 commit comments

Comments
 (0)