So, my Nextcloud has been running fine over the year since I set it up. Yesterday I bought a new, second, domain which I also pointed to the IP of my server. I added the second domain to the trusted domain array in config.php with the same syntax as the one that was already listed.
Unfortunately, I still get the trusted domain error when i use the second domain, the first, original one, still works. I tried using wildcards in the array (*) but that did not work. Also, using:
sudo -u www-data php /var/www/nextcloud/occ config:system:set \ trusted_domains 1 --value=example.com
did not work.
Does anyone have any clue as to what I could try to do in order for my seconds domain to work? I am using HTTPS (LE) and have setup nice url´s.