Nextcloud mit Docker mit eigener URL

Ubuntu 22.04

Docker-compose:

app:
    image: nextcloud
    restart: always
    ports:
      - 8080:80
    links:
      - db
    volumes:
      - nextcloud:/var/www/html
      - share:/share
    environment:
      - MYSQL_PASSWORD=Password
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db

config.php:

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  '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' => 'id',
  'passwordsalt' => 'password',
  'secret' => 'password',
  'trusted_domains' =>
  array (
    0 => 'ip:8080',
    1 => 'host1.com',
    2 => 'server',
    3 => 'host2.com',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '30.0.1.2',
  'overwrite.cli.url' => 'http://ip:8080',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'password',
  'installed' => true,
  'maintenance_window_start' => 1,
  'loglevel' => 0,
  'maintenance' => false,
  'default_phone_region' => 'DE',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_from_address' => 'user',
  'mail_domain' => 'host.com',
  'mail_smtphost' => 'host.com',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'e-mail',
  'mail_smtppassword' => 'password',
);

Ich möchte gerne meine Nextcloud unter ip/nextcloud erreichen.
Ist es möglich, dass ich nicht einen Port zum Verbinden brauche?

Ich habe es hinbekommen!
Unter apache2 habe ich folgendes hinterlegt:

ProxyPass /nextcloud/ http://localhost:8080/
ProxyPassReverse /nextcloud/ http://localhost:8080/

Danach habe ich unter config/config.php folgendes hinzugefügt:

'overwritewebroot' => '/nextcloud',

Damit geht es. Nur leider bekomme ich jetzt immer den Fehler in Nextcloud angezeigt, dass ich nicht über https zugreife, obwohl ich https://meinserver.de/nextcloud aufrufe.
Hat da jemand Ideen?

Der “Proxy…” ist als “http” konfiguriert. Vermutlich liegt es hieran.

Ok, das kann ich nachvollziehen.
Wenn ich schreibe:

ProxyPass /nextcloud/ https://localhost:8080/
ProxyPassReverse /nextcloud/ https://localhost:8080/

Bekomme ich einen 500 Internal Server Error.
Ich habe mal zum Testen unter Docker-compose folgendes hinzugefügt:

    ports:
      - 8080:80
      - 8443:443

Doch wenn ich nun https://192.168.178.2:8443/ oder http://192.168.178.2:8443/ aufrufe, sagt mir Firefox:
Verbindung fehlgeschlagen

Vielleicht hilft Dir der verlinkte Thread besser, als ich es kann. Meine Vermutung mit dem “https” war wohl nicht korrekt.