Nextcloud snap 19 with nginx reverse proxy 502 Bad gateway

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

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:

Nextcloud version 19.0.1snap3
Operating system and version Ubuntu 18.04
Apache or nginx version (whatever is in the snap)
PHP version (whatever is in the snap)

The issue you are facing:

Is this the first time you’ve seen this error? Y

Steps to replicate it:

No idea whats going wrong here. I Configured nextcloud according to the official documentation with nginx as the reverse proxy, using https with letsencrypt (certbot) on the nginx, and https from https://mydomain.something to the server running nextcloud

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' => 
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'instanceid' => 'ocfn05rcgsuv',
  'passwordsalt' => '<salt>',
  'secret' => '<secret>',
  'trusted_domains' => 
  array (
    0 => '127.0.0.1:81',
    1 => 'subdomain.mydomain.sdom',
  ),
  'datadirectory' => '/media/partitions/data/nextcloud',
  'dbtype' => 'mysql',
  'version' => '19.0.1.1',
  'overwrite.cli.url' => 'http://127.0.0.1:81',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '<dbuser>',
  'dbpassword' => '<pw>',
  'installed' => true,
  'overwriteprotocol' => 'https',
  'loglevel' => 2,
  'maintenance' => false,
);

I am unsure exactly as to which logs to include here. If they are needed please tell me exactly which ones are needed :slight_smile: