Please post the output of command config getprop nextcloud VirtualHost and config getprop nextcloud TrustedDomains.
If there is only one entry for each command you can use (you can use this also if you have more than one entry, but remember that these commands delete all configuration for VirtualHost and TrustedDomains)
remove the line in trusted domain for the former vhost (oldsub.myserver.org) an adding my servers host
remove letsencryt
it works fine.
Checking vhosts or letsencrypt config on commandline does not show any entries as well.
BUT … every night/etc/httpd/conf.d/zz_nextcloud.conf resets to the old settings, which used the cert of the subdomain “… oldsub.myserver.org” . This hinders httpd service from start, because the cert does not exist any more. So, every night, all servers which use httpd go down.
Any idea? As far as I can say, there is nothing in any config pointing to this setting (usage of the a virtual host for nextcloud)…
if cat /etc/httpd/conf.d/zz_nextcloud.conf | grep SSLCertificate
then
echo OK
else
sed -e '/Alias/{h;r /root/bin/zz_nextcloud_letsencrypt.txt' -e 'g;N}' /etc/httpd/conf.d/zz_nextcloud.conf > /etc/httpd/conf.d/zz_nextcloud.conf.new
mv /etc/httpd/conf.d/zz_nextcloud.conf.new /etc/httpd/conf.d/zz_nextcloud.conf
service httpd restart
fi
Removed the cronjob, problem solved.
Lesson learned: use e-smith and templates.
Cheers Axel