Redirection not working / removing "remote.php/dav" from URL


I installed NextCloud from scratch on Armbian (Debian Buster), unzipping the contents of the into /var/www/. Then I copied the nginx configuration from here, and only changed the IP and server name. But no matter which one of the two configuration files I use, NC still tells my that it is not configured to resolve “/.well-known/caldav” and “/.well-known/carddav”, when I enter the admin’s page.

Everything else works, but I still have to tell clients to use the ugly looking URL “https:///remote.php/webdav/” to synchronise calendars or contacts.

So, what is wrong in the given configuration files?

Thanks in advance!