# Nextcloud Files App doesn't work behind nginx reverse proxy

**URL:** <https://help.nextcloud.com/t/nextcloud-files-app-doesnt-work-behind-nginx-reverse-proxy/48977>\
**Category:** ℹ️ Support\
**Tags:** nc15, nginx, webdav\
**Created:** [March 7, 2019, 8:28am UTC](https://help.nextcloud.com/t/nextcloud-files-app-doesnt-work-behind-nginx-reverse-proxy/48977 "2019-03-07T08:28:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![colophium1](https://help.nextcloud.com/letter_avatar/colophium1/32/6_22734026db12803ebb3e059622ac3534.png) [@colophium1](https://help.nextcloud.com/u/colophium1)\
**Post date:** [March 7, 2019, 8:28am UTC](https://help.nextcloud.com/t/nextcloud-files-app-doesnt-work-behind-nginx-reverse-proxy/48977/1 "2019-03-07T08:28:46Z")

</div>

Hello!  
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=/](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?

---

<div class="post-metadata">

**Author:** ![j2b](https://help.nextcloud.com/letter_avatar/j2b/32/6_22734026db12803ebb3e059622ac3534.png) [@j2b](https://help.nextcloud.com/u/j2b)\
**Post date:** [March 17, 2019, 8:38am UTC](https://help.nextcloud.com/t/nextcloud-files-app-doesnt-work-behind-nginx-reverse-proxy/48977/2 "2019-03-17T08:38:15Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![benjmarshall](https://help.nextcloud.com/user_avatar/help.nextcloud.com/benjmarshall/32/14305_2.png) [@benjmarshall](https://help.nextcloud.com/u/benjmarshall)\
**Post date:** [March 31, 2019, 7:53pm UTC](https://help.nextcloud.com/t/nextcloud-files-app-doesnt-work-behind-nginx-reverse-proxy/48977/3 "2019-03-31T19:53:02Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![zvzv](https://help.nextcloud.com/letter_avatar/zvzv/32/6_22734026db12803ebb3e059622ac3534.png) [@zvzv](https://help.nextcloud.com/u/zvzv)\
**Post date:** [April 19, 2019, 3:44am UTC](https://help.nextcloud.com/t/nextcloud-files-app-doesnt-work-behind-nginx-reverse-proxy/48977/4 "2019-04-19T03:44:13Z")

</div>

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 12.34.56.78, lan 192.168.0.1] \<-- 80 port forward --\> [proxy debian; 192.168.0.2 -\> wordpress:50080, nextcloud:60080] -\> [other services outside of proxy].  
So, I didn’t see infinite loading circle INSIDE of 192.168.0.0 network like 192.168.0.100, for both 12.34.56.78 and 192.168.0.2 access addresses with 80 port. But OUTSIDE of 192.168.0.0 network, that loading screen appear.  
There is also no log on nextcloud. What should I do?

---

<div class="post-metadata">

**Author:** ![zvzv](https://help.nextcloud.com/letter_avatar/zvzv/32/6_22734026db12803ebb3e059622ac3534.png) [@zvzv](https://help.nextcloud.com/u/zvzv)\
**Post date:** [May 4, 2019, 5:24pm UTC](https://help.nextcloud.com/t/nextcloud-files-app-doesnt-work-behind-nginx-reverse-proxy/48977/5 "2019-05-04T17:24:51Z")

</div>

The problem was gone after applying https. 😬

---

<div class="post-metadata">

**Author:** ![johngalea](https://help.nextcloud.com/letter_avatar/johngalea/32/6_22734026db12803ebb3e059622ac3534.png) [@johngalea](https://help.nextcloud.com/u/johngalea)\
**Post date:** [December 26, 2020, 4:14pm UTC](https://help.nextcloud.com/t/nextcloud-files-app-doesnt-work-behind-nginx-reverse-proxy/48977/6 "2020-12-26T16:14:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [September 23, 2024, 4:34pm UTC](https://help.nextcloud.com/t/nextcloud-files-app-doesnt-work-behind-nginx-reverse-proxy/48977/7 "2024-09-23T16:34:26Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 11, 2024, 2:34pm UTC](https://help.nextcloud.com/t/nextcloud-files-app-doesnt-work-behind-nginx-reverse-proxy/48977/8 "2024-12-11T14:34:44Z")

</div>


