Internal Server Error when access Web Interface

Nextcloud version (eg, 20.0.5): NextCloudPi v1.50.0, NextCloud 23.0.6.1
Operating system and version (eg, Ubuntu 20.04): Raspbian GNU/Linux 10 (buster)
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.38 (Raspbian)
PHP version (eg, 7.4): PHP 7.3.31-1~deb10u1 (cli)

The issue you are facing:
Internal server error when accessing the Web Interface. My isp blocks port 80, so I use acme.sh to create a self signed certificate.

Is this the first time you’ve seen this error? (Y/N):
Y

Steps to replicate it:

  1. Not sure. It was working fine until about a week ago. It may have been an automatic update that caused it.

Config file:

/var/www/nextcloud/config/config.php

<?php
$CONFIG = array (
  'passwordsalt' => '<REMOVED>',
  'secret' => '<REMOVED>',
  'trusted_domains' =>
  array (
    0 => 'subdomain.mydomain.tld',
  ),
  'datadirectory' => '/media/myCloudDrive/ncdata',
  'dbtype' => 'mysql',
  'version' => '23.0.6.1',
  'overwrite.cli.url' => 'https://nextcloudpi/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'ncadmin',
  'dbpassword' => '<REMOVED>',
  'installed' => true,
  'instanceid' => '<REMOVED>',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => '<REMOVED>',
  ),
  'tempdirectory' => '/media/myCloudDrive/ncdata/tmp',
  'mail_smtpmode' => 'sendmail',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'admin',
  'mail_domain' => 'ownyourbits.com',
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'overwriteprotocol' => 'https',
  'maintenance' => true,
  'logfile' => '/media/myCloudDrive/ncdata/nextcloud.log',
  'loglevel' => 2,
  'log_type' => 'file',
  'has_rebuilt_cache' => true,
  'theme' => '',
  'trusted_proxies' =>
  array (
    11 => '127.0.0.1',
    12 => '::1',
    13 => 'nextcloudpi',
    14 => '127.0.1.1',
  ),
  'data-fingerprint' => '<REMOVED>',
);

ncp-report:

NextCloudPi diagnostics

NextCloudPi version  v1.50.0
NextCloudPi image    NextCloudPi_07-21-19
OS                   Raspbian GNU/Linux 10. 5.10.103-v7l+ (armv7l)
automount            yes
USB devices          sda
datadir              /media/myCloudDrive/ncdata
data in SD           no
data filesystem      btrfs
data disk usage      581G/1.9T
rootfs usage         3.1G/30G
swapfile             /var/swap
dbdir                /var/lib/mysql
Nextcloud check      error
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          down
Postfix service      up
Internet check       ok
public IP            ***REMOVED SENSITIVE VALUE***
public IP            ***REMOVED SENSITIVE VALUE***
Port check 80        closed
Port check 443       open (ipv4)
IP                   ***REMOVED SENSITIVE VALUE***
Gateway              192.168.131.1
Interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
Uptime               1day

Nextcloud configuration

An unhandled exception has been thrown:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_appconfig' doesn't exist in /var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php:82
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php(82): PDO->query('SELECT * FROM `...')
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1062): Doctrine\DBAL\Driver\PDO\Connection->query('SELECT * FROM `...')
#2 /var/www/nextcloud/lib/private/DB/Connection.php(237): Doctrine\DBAL\Connection->executeQuery('SELECT * FROM `...', Array, Array, NULL)
#3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Connection->executeQuery('SELECT * FROM `...', Array, Array)
#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /var/www/nextcloud/lib/private/AppConfig.php(361): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /var/www/nextcloud/lib/private/AppConfig.php(126): OC\AppConfig->loadConfigValues()
#7 /var/www/nextcloud/lib/private/AppConfig.php(317): OC\AppConfig->getApps()
#8 /var/www/nextcloud/lib/private/legacy/OC_App.php(982): OC\AppConfig->getValues(false, 'installed_versi...')
#9 /var/www/nextcloud/lib/private/Server.php(692): OC_App::getAppVersions()
#10 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\Server->OC\{closure}(Object(OC\Server))
#11 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#12 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet('OC\\Memcache\\Fac...')
#13 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query('OC\\Memcache\\Fac...', false)
#14 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query('OC\\Memcache\\Fac...')
#15 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(182): OC\AppFramework\Utility\SimpleContainer->get('OC\\Memcache\\Fac...')
#16 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#17 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#18 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet('OCP\\ICacheFacto...')
#19 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query('OCP\\ICacheFacto...', false)
#20 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query('OCP\\ICacheFacto...')
#21 /var/www/nextcloud/lib/private/Server.php(1079): OC\AppFramework\Utility\SimpleContainer->get('OCP\\ICacheFacto...')
#22 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\Server->OC\{closure}(Object(OC\Server))
#23 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#24 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet('OCP\\Lock\\ILocki...')
#25 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query('OCP\\Lock\\ILocki...', false)
#26 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query('OCP\\Lock\\ILocki...')
#27 /var/www/nextcloud/lib/private/Server.php(2040): OC\AppFramework\Utility\SimpleContainer->get('OCP\\Lock\\ILocki...')
#28 /var/www/nextcloud/lib/private/Files/View.php(118): OC\Server->getLockingProvider()
#29 /var/www/nextcloud/lib/private/Server.php(439): OC\Files\View->__construct()
#30 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\Server->OC\{closure}(Object(OC\Server))
#31 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#32 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet('OC\\Files\\Node\\H...')
#33 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query('OC\\Files\\Node\\H...', false)
#34 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query('OC\\Files\\Node\\H...')
#35 /var/www/nextcloud/lib/private/Server.php(1403): OC\AppFramework\Utility\SimpleContainer->get('OC\\Files\\Node\\H...')
#36 /var/www/nextcloud/lib/base.php(594): OC\Server->boot()
#37 /var/www/nextcloud/lib/base.php(1089): OC::init()
#38 /var/www/nextcloud/console.php(48): require_once('/var/www/nextcl...')
#39 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#40 {main}

Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_appconfig' doesn't exist in /var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php:26
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php(87): Doctrine\DBAL\Driver\PDO\Exception::new(Object(PDOException))
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1062): Doctrine\DBAL\Driver\PDO\Connection->query('SELECT * FROM `...')
#2 /var/www/nextcloud/lib/private/DB/Connection.php(237): Doctrine\DBAL\Connection->executeQuery('SELECT * FROM `...', Array, Array, NULL)
#3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Connection->executeQuery('SELECT * FROM `...', Array, Array)
#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /var/www/nextcloud/lib/private/AppConfig.php(361): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /var/www/nextcloud/lib/private/AppConfig.php(126): OC\AppConfig->loadConfigValues()
#7 /var/www/nextcloud/lib/private/AppConfig.php(317): OC\AppConfig->getApps()
#8 /var/www/nextcloud/lib/private/legacy/OC_App.php(982): OC\AppConfig->getValues(false, 'installed_versi...')
#9 /var/www/nextcloud/lib/private/Server.php(692): OC_App::getAppVersions()
#10 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\Server->OC\{closure}(Object(OC\Server))
#11 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#12 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet('OC\\Memcache\\Fac...')
#13 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query('OC\\Memcache\\Fac...', false)
#14 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query('OC\\Memcache\\Fac...')
#15 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(182): OC\AppFramework\Utility\SimpleContainer->get('OC\\Memcache\\Fac...')
#16 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#17 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#18 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet('OCP\\ICacheFacto...')
#19 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query('OCP\\ICacheFacto...', false)
#20 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query('OCP\\ICacheFacto...')
#21 /var/www/nextcloud/lib/private/Server.php(1079): OC\AppFramework\Utility\SimpleContainer->get('OCP\\ICacheFacto...')
#22 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\Server->OC\{closure}(Object(OC\Server))
#23 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#24 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet('OCP\\Lock\\ILocki...')
#25 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query('OCP\\Lock\\ILocki...', false)
#26 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query('OCP\\Lock\\ILocki...')
#27 /var/www/nextcloud/lib/private/Server.php(2040): OC\AppFramework\Utility\SimpleContainer->get('OCP\\Lock\\ILocki...')
#28 /var/www/nextcloud/lib/private/Files/View.php(118): OC\Server->getLockingProvider()
#29 /var/www/nextcloud/lib/private/Server.php(439): OC\Files\View->__construct()
#30 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\Server->OC\{closure}(Object(OC\Server))
#31 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#32 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet('OC\\Files\\Node\\H...')
#33 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query('OC\\Files\\Node\\H...', false)
#34 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query('OC\\Files\\Node\\H...')
#35 /var/www/nextcloud/lib/private/Server.php(1403): OC\AppFramework\Utility\SimpleContainer->get('OC\\Files\\Node\\H...')
#36 /var/www/nextcloud/lib/base.php(594): OC\Server->boot()
#37 /var/www/nextcloud/lib/base.php(1089): OC::init()
#38 /var/www/nextcloud/console.php(48): require_once('/var/www/nextcl...')
#39 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#40 {main}

Next Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_appconfig' doesn't exist in /var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:47
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1780): Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert(Object(Doctrine\DBAL\Driver\PDO\Exception), Object(Doctrine\DBAL\Query))
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1719): Doctrine\DBAL\Connection->handleDriverException(Object(Doctrine\DBAL\Driver\PDO\Exception), Object(Doctrine\DBAL\Query))
#2 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1067): Doctrine\DBAL\Connection->convertExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDO\Exception), 'SELECT * FROM `...', Array, Array)
#3 /var/www/nextcloud/lib/private/DB/Connection.php(237): Doctrine\DBAL\Connection->executeQuery('SELECT * FROM `...', Array, Array, NULL)
#4 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Connection->executeQuery('SELECT * FROM `...', Array, Array)
#5 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/nextcloud/lib/private/AppConfig.php(361): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/nextcloud/lib/private/AppConfig.php(126): OC\AppConfig->loadConfigValues()
#8 /var/www/nextcloud/lib/private/AppConfig.php(317): OC\AppConfig->getApps()
#9 /var/www/nextcloud/lib/private/legacy/OC_App.php(982): OC\AppConfig->getValues(false, 'installed_versi...')
#10 /var/www/nextcloud/lib/private/Server.php(692): OC_App::getAppVersions()
#11 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\Server->OC\{closure}(Object(OC\Server))
#12 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#13 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet('OC\\Memcache\\Fac...')
#14 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query('OC\\Memcache\\Fac...', false)
#15 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query('OC\\Memcache\\Fac...')
#16 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(182): OC\AppFramework\Utility\SimpleContainer->get('OC\\Memcache\\Fac...')
#17 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#18 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#19 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet('OCP\\ICacheFacto...')
#20 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query('OCP\\ICacheFacto...', false)
#21 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query('OCP\\ICacheFacto...')
#22 /var/www/nextcloud/lib/private/Server.php(1079): OC\AppFramework\Utility\SimpleContainer->get('OCP\\ICacheFacto...')
#23 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\Server->OC\{closure}(Object(OC\Server))
#24 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#25 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet('OCP\\Lock\\ILocki...')
#26 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query('OCP\\Lock\\ILocki...', false)
#27 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query('OCP\\Lock\\ILocki...')
#28 /var/www/nextcloud/lib/private/Server.php(2040): OC\AppFramework\Utility\SimpleContainer->get('OCP\\Lock\\ILocki...')
#29 /var/www/nextcloud/lib/private/Files/View.php(118): OC\Server->getLockingProvider()
#30 /var/www/nextcloud/lib/private/Server.php(439): OC\Files\View->__construct()
#31 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\Server->OC\{closure}(Object(OC\Server))
#32 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#33 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet('OC\\Files\\Node\\H...')
#34 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query('OC\\Files\\Node\\H...', false)
#35 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query('OC\\Files\\Node\\H...')
#36 /var/www/nextcloud/lib/private/Server.php(1403): OC\AppFramework\Utility\SimpleContainer->get('OC\\Files\\Node\\H...')
#37 /var/www/nextcloud/lib/base.php(594): OC\Server->boot()
#38 /var/www/nextcloud/lib/base.php(1089): OC::init()
#39 /var/www/nextcloud/console.php(48): require_once('/var/www/nextcl...')
#40 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#41 {main}
HTTPd logs

[Sun Sep 25 08:45:35.605223 2022] [authz_host:error] [pid 9782:tid 2772468736] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /css/ncp.css failed, reason: unable to get the remote host name
[Sun Sep 25 08:45:35.606318 2022] [authz_host:error] [pid 9782:tid 2789270528] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /img/loading-small.gif failed, reason: unable to get the remote host name
[Sun Sep 25 08:45:35.606221 2022] [authz_host:error] [pid 9782:tid 2780869632] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /img/ncp-logo.svg failed, reason: unable to get the remote host name
[Sun Sep 25 08:45:35.715248 2022] [authz_host:error] [pid 9782:tid 2755666944] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /img/poweroff.svg failed, reason: unable to get the remote host name
[Sun Sep 25 08:45:35.715248 2022] [authz_host:error] [pid 9782:tid 2780869632] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /img/reboot.svg failed, reason: unable to get the remote host name
[Sun Sep 25 08:45:35.715321 2022] [authz_host:error] [pid 9782:tid 2772468736] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /img/toggle.svg failed, reason: unable to get the remote host name
[Sun Sep 25 08:45:35.715691 2022] [authz_host:error] [pid 9782:tid 2764067840] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /img/defaults.svg failed, reason: unable to get the remote host name
[Sun Sep 25 08:45:35.766736 2022] [authz_host:error] [pid 9782:tid 2780869632] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /img/dashboard.svg failed, reason: unable to get the remote host name, referer: https://subdomain.mydomain.tld:4443/css/ncp.css
[Sun Sep 25 08:45:35.766742 2022] [authz_host:error] [pid 9782:tid 2755666944] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /img/defaults-white.svg failed, reason: unable to get the remote host name, referer: https://subdomain.mydomain.tld:4443/css/ncp.css
[Sun Sep 25 08:45:35.766810 2022] [authz_host:error] [pid 9782:tid 2789270528] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /img/settings-white.svg failed, reason: unable to get the remote host name, referer: https://subdomain.mydomain.tld:4443/css/ncp.css
[Sun Sep 25 08:45:35.766945 2022] [authz_host:error] [pid 9782:tid 2797671424] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /img/logs.svg failed, reason: unable to get the remote host name, referer: https://subdomain.mydomain.tld:4443/css/ncp.css
[Sun Sep 25 08:45:35.767239 2022] [authz_host:error] [pid 9782:tid 2764067840] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /img/search.svg failed, reason: unable to get the remote host name, referer: https://subdomain.mydomain.tld:4443/css/ncp.css
[Sun Sep 25 08:45:35.767745 2022] [authz_host:error] [pid 9782:tid 2772468736] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /img/nc-button.svg failed, reason: unable to get the remote host name, referer: https://subdomain.mydomain.tld:4443/css/ncp.css
[Sun Sep 25 08:45:35.767885 2022] [authz_host:error] [pid 9782:tid 2780869632] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /img/wizard.svg failed, reason: unable to get the remote host name, referer: https://subdomain.mydomain.tld:4443/css/ncp.css
[Sun Sep 25 08:45:35.768432 2022] [authz_host:error] [pid 9782:tid 2764067840] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /img/files.svg failed, reason: unable to get the remote host name, referer: https://subdomain.mydomain.tld:4443/css/ncp.css
[Sun Sep 25 08:45:35.768501 2022] [authz_host:error] [pid 9782:tid 2806072320] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /img/info-white.svg failed, reason: unable to get the remote host name, referer: https://subdomain.mydomain.tld:4443/css/ncp.css
[Sun Sep 25 08:45:35.771035 2022] [authz_host:error] [pid 9782:tid 2764067840] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /ncp-output.php failed, reason: unable to get the remote host name
[Sun Sep 25 08:45:35.771035 2022] [authz_host:error] [pid 9782:tid 2806072320] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /ncp-launcher.php failed, reason: unable to get the remote host name
[Sun Sep 25 08:45:45.361866 2022] [authz_host:error] [pid 9782:tid 2806072320] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /ncp-launcher.php failed, reason: unable to get the remote host name
[Sun Sep 25 08:45:45.386067 2022] [authz_host:error] [pid 9782:tid 2806072320] [client 192.168.131.1:14103] AH01753: access check of 'localhost' to /ncp-launcher.php failed, reason: unable to get the remote host name

Database logs


Nextcloud logs

{"reqId":"anh7DUC3KrvRXUV4MSHI","level":3,"time":"2022-09-22T23:05:01+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Not installed","userAgent":"--","version":"23.0.6.1","exception":{"Exception":"Exception","Message":"Not installed","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/base.php","line":649,"function":"checkInstalled","class":"OC","type":"::","args":[{"__class__":"OC\\SystemConfig"}]},{"file":"/var/www/nextcloud/lib/base.php","line":1089,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/nextcloud/cron.php","line":43,"args":["/var/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/base.php","Line":277,"CustomMessage":"--"}}
{"reqId":"YyzqH3HPI7yBKzUz280CVgAACAE","level":2,"time":"2022-09-22T23:05:03+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"GET","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0","version":"23.0.6.1"}
{"reqId":"YyzqH3HPI7yBKzUz280CVgAACAE","level":2,"time":"2022-09-22T23:05:03+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"GET","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0","version":"23.0.6.1"}
{"reqId":"YyzqYFHl8FIB64a2AArOTQAAAEI","level":2,"time":"2022-09-22T23:06:08+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"GET","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"Joplin/1.0","version":"23.0.6.1"}
{"reqId":"YyzqYFHl8FIB64a2AArOTQAAAEI","level":2,"time":"2022-09-22T23:06:08+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"GET","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"Joplin/1.0","version":"23.0.6.1"}
{"reqId":"7kzvzYhVPtFkNMdA0gDu","level":3,"time":"2022-09-22T23:10:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Not installed","userAgent":"--","version":"23.0.6.1","exception":{"Exception":"Exception","Message":"Not installed","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/base.php","line":649,"function":"checkInstalled","class":"OC","type":"::","args":[{"__class__":"OC\\SystemConfig"}]},{"file":"/var/www/nextcloud/lib/base.php","line":1089,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/nextcloud/cron.php","line":43,"args":["/var/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/base.php","Line":277,"CustomMessage":"--"}}
{"reqId":"YyzrkVHl8FIB64a2AArOVgAAAEg","level":2,"time":"2022-09-22T23:11:13+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"GET","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"Joplin/1.0","version":"23.0.6.1"}
{"reqId":"YyzrkVHl8FIB64a2AArOVgAAAEg","level":2,"time":"2022-09-22T23:11:13+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"GET","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"Joplin/1.0","version":"23.0.6.1"}
{"reqId":"Yyzr1VHl8FIB64a2AArOXAAAAFU","level":2,"time":"2022-09-22T23:12:21+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"Mozilla/5.0 Enpass","version":"23.0.6.1"}
{"reqId":"Yyzr1VHl8FIB64a2AArOXAAAAFU","level":2,"time":"2022-09-22T23:12:21+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"Mozilla/5.0 Enpass","version":"23.0.6.1"}
{"reqId":"Yyzr6VHl8FIB64a2AArOXgAAQQI","level":2,"time":"2022-09-22T23:12:41+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"OPTIONS","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"iOS/16.0 (20A362) dataaccessd/1.0","version":"23.0.6.1"}
{"reqId":"Yyzr6VHl8FIB64a2AArOXgAAQQI","level":2,"time":"2022-09-22T23:12:41+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"OPTIONS","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"iOS/16.0 (20A362) dataaccessd/1.0","version":"23.0.6.1"}
{"reqId":"Yyzr6VHl8FIB64a2AArOYAAAQwI","level":2,"time":"2022-09-22T23:12:41+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"iOS/16.0 (20A362) dataaccessd/1.0","version":"23.0.6.1"}
{"reqId":"Yyzr6VHl8FIB64a2AArOYAAAQwI","level":2,"time":"2022-09-22T23:12:41+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"iOS/16.0 (20A362) dataaccessd/1.0","version":"23.0.6.1"}
{"reqId":"Yyzr-VHl8FIB64a2AArOYgAASQI","level":2,"time":"2022-09-22T23:13:01+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"OPTIONS","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"iOS/16.0 (20A362) dataaccessd/1.0","version":"23.0.6.1"}
{"reqId":"Yyzr-VHl8FIB64a2AArOYgAASQI","level":2,"time":"2022-09-22T23:13:01+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"OPTIONS","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"iOS/16.0 (20A362) dataaccessd/1.0","version":"23.0.6.1"}
{"reqId":"Yyzr-lHl8FIB64a2AArOZAAASwI","level":2,"time":"2022-09-22T23:13:02+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"iOS/16.0 (20A362) dataaccessd/1.0","version":"23.0.6.1"}
{"reqId":"Yyzr-lHl8FIB64a2AArOZAAASwI","level":2,"time":"2022-09-22T23:13:02+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"iOS/16.0 (20A362) dataaccessd/1.0","version":"23.0.6.1"}
{"reqId":"YyzsHlHl8FIB64a2AArOaAAAAFQ","level":2,"time":"2022-09-22T23:13:34+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"GET","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"Joplin/1.0","version":"23.0.6.1"}
{"reqId":"YyzsHlHl8FIB64a2AArOaAAAAFQ","level":2,"time":"2022-09-22T23:13:34+00:00","remoteAddr":"192.168.131.1","user":"--","app":"no app in context","method":"GET","url":"/index.php","message":"Host 192.168.131.112 was not connected to because it violates local access rules","userAgent":"Joplin/1.0","version":"23.0.6.1"}

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        30G  3.2G   25G  12% /
devtmpfs        1.8G     0  1.8G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           1.9G  201M  1.7G  11% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/mmcblk0p1  253M   49M  204M  20% /boot
/dev/sda1       1.9T  581G  1.3T  32% /media/myCloudDrive
tmpfs           384M     0  384M   0% /run/user/1000

Hmm, it seems Nextcloud have been restored, or at least, it thinks it hasn’t been initiated according to your Nextcloud logs.

Do you have access to your files? If you recover them and move them somewhere else with the backup of your Nextcloud settings you can start trying different attempts to restore it else you might accidentally delete them

It could be that you need to change the redis socket path in your config also

From
'host' => '/var/run/redis/redis.sock',
To
'host' => '/run/redis/redis.sock',

I tried setting ‘host’ => ‘/var/run/redis/redis.sock’. Didn’t do anything.

Doesn’t this error in the Nextcloud configuration section of ncp-report suggest there’s something wrong with my database?:

An unhandled exception has been thrown:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_appconfig' doesn't exist in /var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php:82

I was attempting to go through the setup again by putting the CAN_INSTALL file in /var/www/nextcloud/config and changing in the config.php file: ‘installed’ => false. When I got to the part where it asks to setup an admin username/password and database username/password & database name and host, I wasn’t sure if doing this would wipe out my existing files, so I stopped, removed CAN_INSTALL, and changed the config setting back to ‘installed’ => true.

Should I try setting it up again?

Yes you’re right, I was wrong, thinking about another issue where that needs to be changed to run :pray:

Yes, initiating Nextcloud again like that will delete your files.

If you remove the user files and the backup tar to another drive or device so they are safe, you can safely do it and then restore the backup tar with settings from there or a reinstall with a fresh image then move your files back in and scan for external files added with occ/ncc command

I reinstalled and used nc-scan to add all the files on the external drive connected to the raspberry pi. I then tried syncing to my Windows 11 PC by using the Nextcloud desktop client. Now the problem is it’s downloading and overwriting all of my files, changing the create date for everything to today. Why is it doing this? Is there a way to restore the original create dates without restoring a backup?