[SOLVED] Cannot login or reset pwd via web after upgrade to docker/nc15

In the beginning, I had a working nc13 installation using docker-compose. Then I inadvertently upgraded without realizing I was jumping straight to nc15, which sent me into all kinds of trouble. After recovering thanks to the instructions at the bottom of this post, I was able to run the upgrade successfully.

Now syncing through the desktop application and iOS app (not using web login) resume normally, BUT no users can log in via the web interface, web password reset fails to send the reset email (proper warning is displayed on the login page), and group folders cannot be accessed. All files in the nextcloud folder (/var/www/html) belong to www-data. Nothing shows up in the logs. User info shows all users as active and reset password via occ works fine.

Nextcloud version: 15.0.0.10
Operating system and version: docker 18.0.9, docker-compose v. 1.23.2
Dockerfile: apache-cron-redis-mariadb
The installation is on a home server that connects through OpenVPN to the fixed-ip front-end which has SSL and sends requests through a reverse proxy.

config.php file:

<?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.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'redis',
    'port' => 6379,
  ),
  'instanceid' => '******************',
  'passwordsalt' => '********************',
  'secret' => '********************',
  'trusted_domains' => 
  array (
    0 => '***************',
    1 => '***************',
  ),
  'datadirectory' => '/var/www/html/data',
  'overwrite.cli.url' => '********************',
  'dbtype' => 'mysql',
  'version' => '15.0.0.10',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'dbport' => '',
  'dbtableprefix' => '',
  'mysql.utf8mb4' => true,
  'dbuser' => '****************',
  'dbpassword' => '***************',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => '*************',
  'mail_domain' => '**************',
  'mail_smtphost' => '*****************',
  'mail_smtpauth' => 1,
  'mail_smtpport' => '*************',
  'mail_smtpname' => '******************',
  'mail_smtppassword' => '******************',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
);

maintenance:repair returns:

Failed to load repair step for dav: Repair step 'OCA\DAV\Migration\FixBirthdayCalendarComponent' is unknown
Failed to load repair step for dav: Repair step 'OCA\DAV\Migration\CalDAVRemoveEmptyValue' is unknown
Failed to load repair step for dav: Repair step 'OCA\DAV\Migration\BuildCalendarSearchIndex' is unknown
Failed to load repair step for dav: Repair step 'OCA\DAV\Migration\RefreshWebcalJobRegistrar' is unknown
Failed to load repair step for files_sharing: Repair step 'OCA\Files_Sharing\Migration\OwncloudGuestShareType' is unknown
Failed to load repair step for files_sharing: Repair step 'OCA\Files_Sharing\Migration\SetPasswordColumn' is unknown
Failed to load repair step for oauth2: Repair step 'OCA\OAuth2\Migration\SetTokenExpiration' is unknown
Failed to load repair step for twofactor_backupcodes: Repair step 'OCA\TwoFactorBackupCodes\Migration\CheckBackupCodes' is unknown
 - Repair MySQL collation
     - All tables already have the correct collation -> nothing to do
 - Repair mime types
 - Clean tags and favorites
     - 0 tags of deleted users have been removed.
     - 0 tags for delete files have been removed.
     - 0 tag entries for deleted tags have been removed.
     - 0 tags with no entries have been removed.
 - Repair invalid shares
 - Remove shares of a users root folder
 - Move .step file of updater to backup location
 - Fix potential broken mount points
     - No mounts updated
 - Repair invalid paths in file cache
 - Add log rotate job
 - Clear frontend caches
     - Image cache cleared
     - SCSS cache cleared
     - JS cache cleared
 - Clear every generated avatar on major updates
 - Add preview background cleanup job
 - Queue a one-time job to cleanup old backups of the updater
 - Repair pending cron jobs
     - No need to repair pending cron jobs.
 - Extract the vcard uid and store it in the db

Workarounds to recover from the upgrading across multiple major versions is unsupported:

[https://mergy.org/2018/01/getting-around-the-false-nextcloud-update-exception-updates-between-multiple-major-versions-and-downgrades-are-unsupported-update-failed/]

[Upgrade error to 14 (docker image)]

SOLVED by removing all files from /var/www except the data folder and re-running Nextcloud install.