Does changing DocumentRoot in NextcloudPi installation cause problems?

NextcloudPi version: 1.52.2
Nextcloud version (eg, 20.0.5): 26.0.3.2
Operating system and version (eg, Ubuntu 20.04): Debian GNU/Linux 11.7 (bullseye)
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.56
PHP version (eg, 7.4): 8.1.21

I recently set up my Raspberry Pi 3 Model B with a preconfigured NextcloudPi image from here:
https://github.com/nextcloud/nextcloudpi

I would like to reach my personal website through
MY_DOMAIN.de
and the Nextcloud web interface through
MY_DOMAIN.de/nextcloud.

So I changed the Apache servers DocumentRoot in
/etc/apache2/sites-available/nextcloud.conf
and in
/etc/apache2/sites-enabled/000-default.conf.backup
from
/var/www/nextcloud/
to
/var/www/.

After that change I noticed errors in my ncp.log:

[ nc-limits ] (Sat 22 Jul 17:31:26 CEST 2023)
Using 715364352 for PHP max memory
Installing template 'php/90-ncp.ini.sh'...
System config value trusted_domains => 3 set to string MY_DOMAIN.de
System config value overwrite.cli.url set to string https://MY_DOMAIN.de/
System config value trusted_proxies => 11 set to string 127.0.0.1
Using 16 PHP threads
Installing template 'php/pool.d.www.conf.sh'...
System config value trusted_proxies => 12 set to string ::1
System config value trusted_proxies => 13 set to string MY_DOMAIN.de
System config value trusted_proxies => 14 set to string 87.123.14.71
Installing template 'mysql/91-ncp.cnf.sh'...

Setup notify_push (attempt 1/5)
✓ redis is configured
✓ push server is receiving redis messages
✓ push server can load mount info from database
🗴 push server can't connect to the Nextcloud server
  Client error: 404 Not Found
Setup notify_push (attempt 2/5)
✓ redis is configured
✓ push server is receiving redis messages
✓ push server can load mount info from database
🗴 push server can't connect to the Nextcloud server
  Client error: 404 Not Found
Setup notify_push (attempt 3/5)
✓ redis is configured
✓ push server is receiving redis messages
✓ push server can load mount info from database
🗴 push server can't connect to the Nextcloud server
  Client error: 404 Not Found
Setup notify_push (attempt 4/5)
✓ redis is configured
✓ push server is receiving redis messages
✓ push server can load mount info from database
🗴 push server can't connect to the Nextcloud server
  Client error: 404 Not Found
Setup notify_push (attempt 5/5)
✓ redis is configured
✓ push server is receiving redis messages
✓ push server can load mount info from database
🗴 push server can't connect to the Nextcloud server
  Client error: 404 Not Found

Are my changes of DocumentRoot causing those errors?
Should I change it back or is there a way to inform Nextcloud about my change?
How does Nextcloud know MY_DOMAIN at all? I can not recall giving that information.

Thank you guys for any advice!
Cheers
Mark

Yes, changing the document root will break a lot of things (services, tools, updates). I recommend not doing that :slight_smile:

All right :innocent:
Thanks for the advice.

So I could only store my website in a subdirectory of
/var/www/nextcloud/
so it would be reachable through
MY_DOMAIN.de/SUBDIRECTORY
correct?
Or is there a nicer way?

I now created a subdomain
cloud.MY_DOMAIN.de
that uses DynDNS to reach my RasPi and the actual domain
MY_DOMAIN.de
points to my website on an external webspace.
Seems a clean enough solution that appears to be working so far.