Nextcloud behind HA Proxy?

I have installed Nextcloud using the new TrueNAS SCALE docker app. I can access it via the IP:30027, however I can’t access it via HAProxy (503 error). I have other haProxy configured on my PfSense router, which hosts the certificate, and I have it configured to hosts other sites on the network, which work just fine.

Here’s the relevant parts of my config.php

$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'redis',
    'password' => '1231233132',
    'port' => 6379,
  ),
  'upgrade.disable-web' => true,
  'passwordsalt' => 'asdfsadf',
  'secret' => '12341234',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => '127.0.0.1',
    3 => 'nextcloud',
    4 => '192.168.2.1',
    5 => 'https://cloud.mydomain.com',
    6 => 'cloud.mydomain.com',
  ),
  'trusted_proxies' =>
  array (
    0 => '192.168.0.1'
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'pgsql',
  'version' => '30.0.1.2',
  'overwrite.cli.url' => 'https://cloud.mydomain.com',
  'dbname' => 'nextcloud',
  'dbhost' => 'postgres:5432',
  'dbport' => '',
  'dbtableprefix' => 'oc_',

I tried changing config.php to what makes the most sense to me based on the docs, but none of them seem to work…

503 is the error from your Proxy (service unavailable) or from the target host running Nextcloud?

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