Index.php keeps downloading if server_name matches domain

Nextcloud version: 20.0.6
Nginx : 1.10.3
Php : 7.4.14
php-fpm : 7.4

My Nextcloud domain,, keeps downloading the index.php file.

I have copied the configuration for Nextcloud/Nginx from the Nextcloud site.

I did enable ssl via certbot with a lets encrypt certificate.

If I change the server_name directive from to any name the downloading of the index.php file stops. But obviously a certificate error appears.

My nginx configuration is at pastebin:

Can anyone point me out what Iā€™m missing?