No files detected when moving from apache to nginx

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 30.0.2
  • Operating system and version (e.g., Ubuntu 24.04):
    • Linux 6.1.21-v8 (Raspberry Pi 4)
  • Web server and version (e.g, Apache 2.4.25):
    • apachectl -v
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • apachectl -v / apachectl -v
  • PHP version (e.g, 8.3):
    • 8.2
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • when trying to move to nginx
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Bare Metal
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

when i’m trying to use nginx as the revers proxy server instead of apache (move that i want to do due to some other application that works better with nginx), i can’t access file , the webpage loads fine but no file , also the destop app dosn’t work.
both apache and nginx are on the www-data user which has full permission as i’m running the server with apache for 3 years or so.
can’t understand why as there permisson and the web page does load.

Steps to replicate it (hint: details matter!):

  1. configure nginx to be the revers proxy
  2. load the nextcload deployment page

Log entries

Nextcloud

No logs for some reason (maybe the move back and forth between apache and nginx)

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

nginx error logs are empty

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

$CONFIG = array (
  'instanceid' => '<>',
  'passwordsalt' => '<>',
  'secret' => '<>,
  'trusted_domains' =>
  array (
    0 => '<domain>',
  ),
  'datadirectory' => '/home/pi/8TBRaid/nextcloud/nextcloud-data/',
  'dbtype' => 'mysql',
  'version' => '30.0.2.2',
  'overwrite.cli.url' => '<URL>',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'maintenance' => false,
  'bulkupload.enabled' => false,
  'filelocking.enabled' => false,
  'memories.exiftool_no_local' => true,
  'updater.secret' => ' ',
  'app_install_overwrite' =>
  array (
    0 => 'files_external_gdrive',
  ),
  'theme' => '',
  'loglevel' => 0,
  'memories.vod.path' => '/var/www/nextcloud/apps/memories/bin-ext/go-vod-aarch64',
  'memories.vod.ffmpeg' => '/usr/bin/ffmpeg',
  'memories.vod.ffprobe' => '/usr/bin/ffprobe',
  'updater.release.channel' => 'stable',
  'memories.db.triggers.fcu' => true,
);```

#### Apps

The output of `occ app:list` (if possible).

### Tips for increasing the likelihood of a response

* Use the `preformatted text` formatting option in the editor for all log entries and configuration output.
* If screenshots are useful, feel free to include them. 
  - If possible, also include key error output in text form so it can be searched for.
* Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

A reverse proxy normally goes in front of an existing (functioning) web server. (I.e. Your existing Nextcloud deployment).

It sounds like you’ve perhaps not only tried to deploy a reverse proxy, but also replace the web server (and PHP SAPI presumably).

Can you:

A) elaborate on specifically what you’ve done
B) elaborate a bit on what you’re hoping to accomplish