Forum archive
Nextcloud server will include /index.php by default in the url
The default Nextcloud image, when deployed, will include /index.php in the url. It took quite some time to figure out how to fix this, and I just wanted to share the solution for others. This should be maybe be the default for the Turnkey installation, or at least should be displayed in the Readme/Docs of the image.
- This is for root domain (eg. example.com or nextcloud.example.com). If you have a "/nextcloud" type subfolder path, change it accordingly.
In /var/www/nextcloud/config.php. add the line 'htaccess.RewriteBase' => '/' - Change owner/chown of /var/www/nextcloud/.htaccess from root to www-data (temporarily)
- being in the /nextcloud folder, run this:
runuser -u www-data php occ maintenance:update:htaccess - change owner of .htaccess back to root
Awesome, thanks for this tweak! :) I agree that it'd be good to add by default. I've written it up as a feature request on our tracker.
FWIW, after I wrote that up, it occurred to me that you could probably run the "php occ ..." command as root. Assuming that works, then changing (and changing back) the permissions of the .htaccess file wouldn't be necessary...