The solutions mentioned above can also be found in the nextcloud docs: Proxy Configurations
- Add this line to [root folder of nextcloud]/config/config.php:
'htaccess.RewriteBase' => '/',
Advice on parameter:
In a standard Apache setup this usually equals the folder that Nextcloud is accessible at. So if Nextcloud is accessible via “https://mycloud.org/nextcloud” the correct value would most likely be “/nextcloud”. If Nextcloud is running under “https://mycloud.org/” then it would be “/”.
-
Login to your server via SSH and navigate to your nextcloud folder
-
Run the following command to update your .htaccess file:
occ maintenance:update:htaccess
(on my web hosting server I need to run it like this: php occ maintenance:update:htaccess)
You can update the .htcaccess file in nextcloud root folder manually but I only recommend that when you really know what you are doing.
If you don’t have access to your server via SSH, try running occ commands via web interface.
Let me know if this was clear enough. Cheers