okay first you need to add the new domain to your certificate. You could also just create a new certificate for the new domain only, but to be more flexible, I guess keeping the old domain inside is the better solution for now:
certbot --expand -d old.domain.com,new.domain.com //Replace old.domain.com with the domain/IP you used, to get your first letsencrypt certificate, and new.domain.com with nextcloud-myweb.ddns.net, if I got right.
Then set or add:
to the following Apache config files:
Hmm, I am actually not sure if this is even necessary. You could also skip this first, and see if it works .
The Nextcloud config should be actually still fine, but to be sure, check that within /var/www/nextcloud/config/config.php
you see: ‘overwrite.cli.url’ => ‘https://localhost/nextcloud’,
It is possible to set the domain here as well, but since localhost is handled as well, the solution above is the flexible one.