Configure Strict Transport Security

Hey there,

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.
Source: https://certbot.eff.org/docs/using.html#re-creating-and-updating-existing-certificates

Then set or add:
ServerName nextcloud-myweb.ddns.net
to the following Apache config files:
/etc/apache2/apache2.conf
/etc/apache2/sites-available/000-default.conf
/etc/apache2/sites-available/000-default-le-ssl.conf
Hmm, I am actually not sure if this is even necessary. You could also skip this first, and see if it works :rofl:.

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.