Solve 404 error for .well-known/apple-app-site-association file on SpinupWP with Nginx

I love SpinupWP, but I discovered that the Nginx config was giving 404 errors for the .well-known files used by an app that used the same domain.

To solve it – and the .well-known/assetlinks.json file not returning either – I added the following lines to the /etc/nginx/sites-available/{DOMAIN}/{DOMAIN} file for domain on the SpinupWP powered server after the location ~ \.php$ { ... } section:

location ~ /.well-known/apple-app-site-association {
	default_type application/pkcs7-mime;
}

location = /.well-known/assetlinks.json {
	alias /sites/{DOMAIN}/files/.well-known/assetlinks.json;
}

Thanks to the following suggestions:

You will need to SSH into the SpinupWP server as a Sudo user to do this: https://spinupwp.com/doc/understanding-system-users/#sudo-users

And you can find out more info on changing Nginx settings on SpinupWP here: https://spinupwp.com/doc/changing-nginx-settings/