Moving from Apache to Nginx, "rewrite or internal redirection cycle while internally redirecting to <path>" error

Hello, I’m trying to migrate a Nextcloud 14.latest install from Apache to Nginx/php-fpm. I’ve got it mostly working (CalDav and friends, WebUI, etc all seem to be working great), but file sync/upload seems to be broken. I try to upload a file via the OS X desktop client and it throws an ‘Internal server error’ message. There is nothing printed to the nextcloud.log file, but the nginx error.log file shows:

[error] 10673#10673: *42 rewrite or internal redirection cycle while internally redirecting to
“/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/remote.php/dav/files/law/post-upgrade-file-sync-test.jpg”

I’ve got my nginx config here:
https://paste.fedoraproject.org/paste/F~-lAauhRomCbqQMFzfxHw

What could I be missing?

Have you solved it somehow? I have the same problem.

@krakazyabra did you compare your nginx conf file with the one from the docs?

https://docs.nextcloud.com/server/18/admin_manual/installation/nginx.html

sure. they’re absolutelly the same.