Config.php for reverse proxy

I’m really struggeling with the config file of my nextcloud docker container behind a reverse nginx proxy.

image

My config.php looks like this atm:


<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'trusted_proxies' => ['10.0.100.6'],
  'overwritehost'     => '10.0.0.6:80',
  'overwriteprotocol' => 'http',
  'overwritewebroot'  => '/10.0.100.6/nc',
  'overwrite.cli.url' => 'http://10.0.100.6:8080',
  '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,
    ),
  ),
  'upgrade.disable-web' => true,
  'instanceid' => 'ocqruambsz2g',
  'passwordsalt' => 'bChmdog0YAgLevRTbglbGOrKbD5EEE',
  'secret' => '96pwJdfsFkiihaaazOwtCOIswboGN9AkSBvHQ/dro7fiZEmv',
  'trusted_domains' =>
  array (
          0 => '10.0.100.6:8080',
          1 => '10.0.100.6:80',

  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '28.0.1.1',
  'dbname' => 'db',
  'dbhost' => 'mariadb',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'mysqluser',
  'dbpassword' => 'somemysqlpassword',
  'installed' => true,
);

My nginx conf is here:

server {
    server_name localhost;
    large_client_header_buffers 4 16k;


     location /nc {
    proxy_set_header  Host $host;
    proxy_set_header  X-Real-IP $remote_addr;
    proxy_set_header  X-Forwarded-Proto http;
    proxy_set_header  X-Forwarded-Host $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://10.0.100.6:8080;

    }

     location /wordpress {
    proxy_set_header  Host $host;
    proxy_set_header  X-Real-IP $remote_addr;
    proxy_set_header  X-Forwarded-Proto http;
    proxy_set_header  X-Forwarded-Host $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://10.0.100.6:8888;

    }

    location /.well-known/carddav {
      return 301 $scheme://$host/remote.php/dav;
    }

    location /.well-known/caldav {
      return 301 $scheme://$host/remote.php/dav;
    }

    listen [::]:80;
    listen 80;
}

Some help with the conf file would be realy great :slight_smile:

How does the url look like when you get that error (page not found)?

Try rewriting the contents of

'overwritewebroot'  => '/10.0.100.6/nc',

to

'overwritewebroot'  => '/nc',