Nextcloud Files App doesn't work behind nginx reverse proxy

I have installed Nextcloud 15.0.5 on an nginx + php-fpm server (Ubuntu 18.04 versions) and this setup works like a charm.
Now I also set up another nginx server as a reverse proxy to that Nextcloud server. 99% of it works well except for the Files App in the browser: Whenever I open https://my.domain.from.reverse.proxy/apps/files/?dir=/, it eternally shows the progress throbber and doesn’t display any files. Using the Firefox network monitor, I can see that is hangs at the PROPFIND request, which fails with “504 Gateway Timeout”. This is also visible in the nginx error log:

upstream timed out (110: Connection timed out) while reading response header from upstream, client: my.ip, server: my.domain.from.reverse.proxy, request: “PROPFIND /remote.php/dav/files/username/?”

I have already gone miles to fix this problem, but with no success so far.
It is reproducible in any browser, but not using the Nextcloud desktop app or when doing a manual request with curl. Both issue a PROPFIND request, which is successfully answered.
I have also tried all kinds of proxy_ settings in the nginx reverse proxy site configuration and several permutations of trusted* and overwrite* settings in Nextcloud’s config.php. The problem persists.

Who is successfully running Nextcloud in nginx and behind an nginx reverse proxy? What versions and configurations are you using?
Any idea what else I can try out before totally giving up on that setup?

Just a grasp of idea - isn’t your web server limited to GET, POST, HEAD requests only?
EDIT: never mind, just followed again, your curl is success…

I’m setting up a new Nextcloud install using docker with a nginx lets encrypt docker sat as the web facing server with reverse proxy set up to nextcloud.

I see the same behaviour as you describe op, spinning icon, never loads file list. Did you manage to fix this issue?

I have also very very similar issue, but I’m using reverse proxy with apache2 and nextcloud is installed inside of proxy server.
For more detail:
My network structure is [gateway; WAN, lan] <-- 80 port forward --> [proxy debian; -> wordpress:50080, nextcloud:60080] -> [other services outside of proxy].
So, I didn’t see infinite loading circle INSIDE of network like, for both and access addresses with 80 port. But OUTSIDE of network, that loading screen appear.
There is also no log on nextcloud. What should I do?

The problem was gone after applying https. :grimacing:

Any chance you would be willing to share your proxy config?