Skip to content

Commit 83bf3a0

Browse files
authored
Merge pull request #14938 from nextcloud/fix/htaccess-rewritebase-reverse-proxy
docs: clarify htaccess.RewriteBase is a backend path, not public URL
2 parents 41d3d21 + 486ce78 commit 83bf3a0

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)