ahoy all,
is it possible to install Nextcloud into a subdirectory of the web root e.g. /var/www/nextcloud
but have it be served as if it lives in the web root e.g. /var/www ? in other words the Nextcloud install will be accessed via https://cloud.example.org
though it is actually installed at https://cloud.example.org/nextcloud
? in my particular case i have to use an .htaccess file as i cannot edit the main config of the Apache server.
i have done this many times with other websites (static, WordPress, etc) via redirects in .htaccess files as described here. however it seems to be something particular with Nextcloud that prevents it from working. i have also tried setting in config.php the following options
'overwritewebroot' => '/nextcloud',
'overwrite.cli.url' => 'https://cloud.example.com/',
'htaccess.RewriteBase' => '/nextcloud',
as discussed in some possibly related issues but no luck.
so after much research and trials i am beginning to think that this seemingly simple installation profile is not currently possible with Nextcloud?
thanks.
PS: my .htaccess
files included below
# .htaccess
RewriteEngine on
# forward to nextcloud
RewriteBase /nextcloud
# always HTTPS
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# transparently redirect all request to this directory to a subdirectory
# based on https://help.dreamhost.com/hc/en-us/articles/216109967-Transparently-redirect-your-root-directory-to-a-subdirectory
## Rewrites all URLS without subdirectory in them
RewriteCond %{REQUEST_URI} !^/nextcloud/
## Rewrite all those to /folder
RewriteRule ^(.*)$ /nextcloud/$1 [L]