500 Internal Error after apt upgrade

Nextcloud version (eg, 12.0.2): 17.0.2.1
Operating system and version (eg, Ubuntu 17.04): debian 10
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.38
PHP version (eg, 7.1): 7.3.14-1~deb10u1

The issue you are facing:
After running apt upgrade, Nextcloud returns a 500 and is not working.

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

Steps to replicate it:

  1. Upgrade
  2. Attempt to access nextcloud

The output of your Nextcloud log in Admin > Logging:

Unable as server is offline. Here's the tail of my /var/log/apache2/error.log
[Fri Feb 07 18:43:22.218101 2020] [authz_core:error] [pid 1548] [client 192.168.136.133:37088] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Sat Feb 08 09:43:16.365537 2020] [authz_core:error] [pid 7083] [client 2605:e000:1113:c2e3::132:49850] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Sat Feb 08 12:37:29.824008 2020] [authz_core:error] [pid 1548] [client 192.168.136.133:39902] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Sat Feb 08 14:35:43.488359 2020] [authz_core:error] [pid 1466] [client 192.168.136.133:40116] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Sat Feb 08 14:39:59.031588 2020] [authz_core:error] [pid 7022] [client 2605:e000:1113:c2e3::132:52670] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Sat Feb 08 14:43:16.231791 2020] [authz_core:error] [pid 7084] [client 2605:e000:1113:c2e3::132:52698] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Sat Feb 08 14:49:36.475560 2020] [authz_core:error] [pid 1466] [client 192.168.136.133:40218] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Sat Feb 08 14:56:35.903524 2020] [authz_core:error] [pid 1466] [client 192.168.136.133:40280] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Sat Feb 08 15:08:15.708079 2020] [authz_core:error] [pid 1466] [client 192.168.136.133:40300] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Sat Feb 08 15:12:31.763745 2020] [authz_core:error] [pid 1467] [client 192.168.136.133:40340] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Sat Feb 08 20:51:20.780538 2020] [authz_core:error] [pid 1787] [client 192.168.136.133:40466] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Sun Feb 09 13:22:58.726072 2020] [authz_core:error] [pid 7082] [client 192.168.136.133:46164] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Sun Feb 09 14:42:33.780296 2020] [authz_core:error] [pid 1502] [client 192.168.136.133:46292] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Sun Feb 09 16:34:39.700312 2020] [authz_core:error] [pid 1466] [client 192.168.136.133:46702] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Sun Feb 09 16:36:13.219090 2020] [authz_core:error] [pid 1466] [client 192.168.136.133:46742] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Mon Feb 10 20:20:46.513779 2020] [authz_core:error] [pid 1548] [client 2605:e000:1113:c2e3::132:60964] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Mon Feb 10 20:43:16.847053 2020] [authz_core:error] [pid 1787] [client 192.168.136.133:48664] AH01630: client denied by server configuration: /var/www/html/nextcloud/config
[Tue Feb 11 20:25:56.169863 2020] [mpm_prefork:notice] [pid 173] AH00169: caught SIGTERM, shutting down
[Tue Feb 11 20:33:37.201653 2020] [ssl:warn] [pid 112] AH01909: cloud.odinforce.net:80:0 server certificate does NOT include an ID which matches the server name
[Tue Feb 11 20:33:37.377354 2020] [ssl:warn] [pid 132] AH01909: cloud.odinforce.net:80:0 server certificate does NOT include an ID which matches the server name
[Tue Feb 11 20:33:37.380212 2020] [mpm_prefork:notice] [pid 132] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Feb 11 20:33:37.380231 2020] [core:notice] [pid 132] AH00094: Command line: '/usr/sbin/apache2'
[Tue Feb 11 22:36:29.666671 2020] [mpm_prefork:notice] [pid 132] AH00169: caught SIGTERM, shutting down
[Tue Feb 11 22:36:29.723438 2020] [ssl:warn] [pid 257] AH01909: cloud.odinforce.net:80:0 server certificate does NOT include an ID which matches the server name
[Tue Feb 11 22:36:29.754257 2020] [ssl:warn] [pid 258] AH01909: cloud.odinforce.net:80:0 server certificate does NOT include an ID which matches the server name
[Tue Feb 11 22:36:29.757147 2020] [mpm_prefork:notice] [pid 258] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Feb 11 22:36:29.757166 2020] [core:notice] [pid 258] AH00094: Command line: '/usr/sbin/apache2'
[Tue Feb 11 22:45:36.467433 2020] [mpm_prefork:notice] [pid 258] AH00169: caught SIGTERM, shutting down
[Tue Feb 11 22:45:42.177253 2020] [ssl:warn] [pid 116] AH01909: cloud.odinforce.net:80:0 server certificate does NOT include an ID which matches the server name
[Tue Feb 11 22:45:42.215992 2020] [ssl:warn] [pid 122] AH01909: cloud.odinforce.net:80:0 server certificate does NOT include an ID which matches the server name
[Tue Feb 11 22:45:42.218885 2020] [mpm_prefork:notice] [pid 122] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Feb 11 22:45:42.218914 2020] [core:notice] [pid 122] AH00094: Command line: '/usr/sbin/apache2'
[Tue Feb 18 22:10:42.653427 2020] [mpm_prefork:notice] [pid 122] AH00169: caught SIGTERM, shutting down
[Tue Feb 18 22:17:16.208496 2020] [ssl:warn] [pid 112] AH01909: cloud.odinforce.net:80:0 server certificate does NOT include an ID which matches the server name
[Tue Feb 18 22:17:16.380603 2020] [ssl:warn] [pid 132] AH01909: cloud.odinforce.net:80:0 server certificate does NOT include an ID which matches the server name
[Tue Feb 18 22:17:16.383371 2020] [mpm_prefork:notice] [pid 132] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Feb 18 22:17:16.383392 2020] [core:notice] [pid 132] AH00094: Command line: '/usr/sbin/apache2'
[Wed Feb 19 09:37:25.658206 2020] [php7:error] [pid 134] [client 2605:e000:1113:c2e3::132:39356] script '/var/www/html/nextcloud/forum.php' not found or unable to stat
[Wed Feb 19 20:25:50.582164 2020] [mpm_prefork:notice] [pid 132] AH00169: caught SIGTERM, shutting down
[Wed Feb 19 20:25:50.658453 2020] [ssl:warn] [pid 493] AH01909: cloud.odinforce.net:80:0 server certificate does NOT include an ID which matches the server name
[Wed Feb 19 20:25:50.703390 2020] [ssl:warn] [pid 494] AH01909: cloud.odinforce.net:80:0 server certificate does NOT include an ID which matches the server name
[Wed Feb 19 20:25:50.708250 2020] [mpm_prefork:notice] [pid 494] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Wed Feb 19 20:25:50.708289 2020] [core:notice] [pid 494] AH00094: Command line: '/usr/sbin/apache2'
[Wed Feb 19 20:29:03.788145 2020] [mpm_prefork:notice] [pid 494] AH00169: caught SIGTERM, shutting down
[Wed Feb 19 20:29:03.897687 2020] [mpm_prefork:notice] [pid 518] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Wed Feb 19 20:29:03.897763 2020] [core:notice] [pid 518] AH00094: Command line: '/usr/sbin/apache2'
[Wed Feb 19 20:32:07.092057 2020] [php7:error] [pid 520] [client 2605:e000:1113:c2e3:3da7:fee9:61d4:94af:42848] script '/var/www/html/test.php' not found or unable to stat
[Wed Feb 19 20:32:25.951538 2020] [php7:error] [pid 521] [client 2605:e000:1113:c2e3:3da7:fee9:61d4:94af:42896] script '/var/www/html/opcachetest.php' not found or unable to stat

Here’s my /var/log/apt/history.log for the one that broke it. Extra line breaks added for readability.

Start-Date: 2020-02-10  22:52:34
Commandline: apt upgrade
Requested-By: rhys (1000)
Upgrade: libpython3.7-minimal:amd64 (3.7.3-2, 3.7.3-2+deb10u1), libopenjp2-7:amd64 (2.3.0-2, 2.3.0-2+deb10u1),
libcom-err2:amd64 (1.44.5-1+deb10u2, 1.44.5-1+deb10u3), libcups2:amd64 (2.2.10-6+deb10u1, 2.2.10-6+deb10u2),
libsystemd0:amd64 (241-7~deb10u2, 241-7~deb10u3), mariadb-common:amd64 (1:10.3.18-0+deb10u1, 1:10.3.22-0+deb10u1),
e2fsprogs:amd64 (1.44.5-1+deb10u2, 1.44.5-1+deb10u3), sudo:amd64 (1.8.27-1+deb10u1, 1.8.27-1+deb10u2), mariadb-server-core-10.3:amd64 (1:10.3.18-0+deb10u1, 1:10.3.22-0+deb10u1),
python3.7:amd64 (3.7.3-2, 3.7.3-2+deb10u1), openssh-sftp-server:amd64 (1:7.9p1-10+deb10u1, 1:7.9p1-10+deb10u2),
libpython3.7-stdlib:amd64 (3.7.3-2, 3.7.3-2+deb10u1), libudev1:amd64 (241-7~deb10u2, 241-7~deb10u3), python3.7-minimal:amd64 (3.7.3-2, 3.7.3-2+deb10u1),
mariadb-server-10.3:amd64 (1:10.3.18-0+deb10u1, 1:10.3.22-0+deb10u1), libss2:amd64 (1.44.5-1+deb10u2, 1.44.5-1+deb10u3),
libext2fs2:amd64 (1.44.5-1+deb10u2, 1.44.5-1+deb10u3), systemd-sysv:amd64 (241-7~deb10u2, 241-7~deb10u3),
libpam-systemd:amd64 (241-7~deb10u2, 241-7~deb10u3), systemd:amd64 (241-7~deb10u2, 241-7~deb10u3), openssh-server:amd64 (1:7.9p1-10+deb10u1, 1:7.9p1-10+deb10u2),
openssh-client:amd64 (1:7.9p1-10+deb10u1, 1:7.9p1-10+deb10u2), mariadb-client-10.3:amd64 (1:10.3.18-0+deb10u1, 1:10.3.22-0+deb10u1),
libnss-systemd:amd64 (241-7~deb10u2, 241-7~deb10u3), mariadb-server:amd64 (1:10.3.18-0+deb10u1, 1:10.3.22-0+deb10u1),
mariadb-client-core-10.3:amd64 (1:10.3.18-0+deb10u1, 1:10.3.22-0+deb10u1), libtimedate-perl:amd64 (2.3000-2, 2.3000-2+deb10u1),
libmariadb3:amd64 (1:10.3.18-0+deb10u1, 1:10.3.22-0+deb10u1), libgnutls30:amd64 (3.6.7-4, 3.6.7-4+deb10u2),
libcupsimage2:amd64 (2.2.10-6+deb10u1, 2.2.10-6+deb10u2), base-files:amd64 (10.3+deb10u2, 10.3+deb10u3)
End-Date: 2020-02-10  22:52:49

Also maybe this is helpful? Found the command in my googling and it returned an error:

rhys@hecate:/var/www/html/nextcloud$ sudo -u www-data php occ check
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/html/nextcloud/lib/private/DB/Connection.php:64
Stack trace:
#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(420): OC\DB\Connection->connect()
#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(380): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(324): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(683): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /var/www/html/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(195): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#6 /var/www/html/nextcloud/lib/private/DB/ConnectionFactory.php(156): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#7 /var/www/html/nextcloud/lib/private/Server.php(635): OC\DB\ConnectionFactory->getConnection('mysql', Array)
#8 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#9 /var/www/html/nextcloud/lib/private/ServerContainer.php(120): Pimple\Container->offsetGet('OCP\\IDBConnecti...')
#10 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(161): OC\ServerContainer->query('OCP\\IDBConnecti...')
#11 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#12 /var/www/html/nextcloud/lib/private/ServerContainer.php(120): Pimple\Container->offsetGet('DatabaseConnect...')
#13 /var/www/html/nextcloud/lib/private/Server.php(1554): OC\ServerContainer->query('DatabaseConnect...')
#14 /var/www/html/nextcloud/lib/private/Server.php(362): OC\Server->getDatabaseConnection()
#15 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#16 /var/www/html/nextcloud/lib/private/ServerContainer.php(120): Pimple\Container->offsetGet('OC\\Authenticati...')
#17 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(69): OC\ServerContainer->query('OC\\Authenticati...', true)
#18 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(99): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#19 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(114): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...')
#20 /var/www/html/nextcloud/lib/private/ServerContainer.php(145): OC\AppFramework\Utility\SimpleContainer->query('OC\\Authenticati...', true)
#21 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(69): OC\ServerContainer->query('OC\\Authenticati...', true)
#22 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(99): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#23 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(114): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...')
#24 /var/www/html/nextcloud/lib/private/ServerContainer.php(145): OC\AppFramework\Utility\SimpleContainer->query('OC\\Authenticati...', true)
#25 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(161): OC\ServerContainer->query('OC\\Authenticati...')
#26 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#27 /var/www/html/nextcloud/lib/private/ServerContainer.php(120): Pimple\Container->offsetGet('OC\\Authenticati...')
#28 /var/www/html/nextcloud/lib/private/Server.php(374): OC\ServerContainer->query('OC\\Authenticati...')
#29 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#30 /var/www/html/nextcloud/lib/private/ServerContainer.php(120): Pimple\Container->offsetGet('OC\\User\\Session')
#31 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(161): OC\ServerContainer->query('OC\\User\\Session')
#32 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#33 /var/www/html/nextcloud/lib/private/ServerContainer.php(120): Pimple\Container->offsetGet('UserSession')
#34 /var/www/html/nextcloud/lib/private/Server.php(1430): OC\ServerContainer->query('UserSession')
#35 /var/www/html/nextcloud/lib/private/Server.php(688): OC\Server->getUserSession()
#36 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#37 /var/www/html/nextcloud/lib/private/ServerContainer.php(120): Pimple\Container->offsetGet('OC\\App\\AppManag...')
#38 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(161): OC\ServerContainer->query('OC\\App\\AppManag...')
#39 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#40 /var/www/html/nextcloud/lib/private/ServerContainer.php(120): Pimple\Container->offsetGet('AppManager')
#41 /var/www/html/nextcloud/lib/private/Server.php(1725): OC\ServerContainer->query('AppManager')
#42 /var/www/html/nextcloud/lib/private/legacy/app.php(346): OC\Server->getAppManager()
#43 /var/www/html/nextcloud/lib/private/legacy/app.php(114): OC_App::getEnabledApps()
#44 /var/www/html/nextcloud/lib/base.php(640): OC_App::loadApps(Array)
#45 /var/www/html/nextcloud/lib/base.php(1078): OC::init()
#46 /var/www/html/nextcloud/console.php(46): require_once('/var/www/html/n...')
#47 /var/www/html/nextcloud/occ(11): require_once('/var/www/html/n...')

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'oc5z9f4x250c',
  'passwordsalt' => 'nope',
  'secret' => 'best not',
  'trusted_domains' => 
  array (
    0 => 'cloud.odinforce.net',
  ),
  'datadirectory' => '/mnt',
  'dbtype' => 'mysql',
  'version' => '17.0.2.1',
  'overwrite.cli.url' => 'https://cloud.odinforce.net',
  'dbname' => 'nextclouddbnew',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextclouduser',
  'dbpassword' => 'password',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpport' => '587',
  'mail_smtpsecure' => 'tls',
  'mail_from_address' => 'me.me',
  'mail_domain' => 'gmail.com',
  'mail_smtpname' => 'me.me@gmail.com',
  'mail_smtppassword' => 'password',
  'maintenance' => false,
);

The output of your Apache/nginx/system log in /var/log/____:

access.log here since I gave error.log up there
192.168.136.133 - - [19/Feb/2020:20:12:54 -1000] "GET /ocs/v2.php/core/navigation/apps?absolute=true&format=json HTTP/1.0" 200 2057 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
192.168.136.133 - rhys [19/Feb/2020:20:12:54 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3::132 - rhys [19/Feb/2020:20:13:25 -1000] "GET /status.php HTTP/1.0" 500 2076 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
192.168.136.220 - - [19/Feb/2020:20:13:35 -1000] "GET / HTTP/1.1" 200 3380 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"
192.168.136.220 - - [19/Feb/2020:20:13:35 -1000] "GET /icons/openlogo-75.png HTTP/1.1" 200 6040 "http://hecate/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"
192.168.136.220 - - [19/Feb/2020:20:13:35 -1000] "GET /favicon.ico HTTP/1.1" 404 484 "http://hecate/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"
192.168.136.133 - rhys [19/Feb/2020:20:13:57 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3::132 - rhys [19/Feb/2020:20:14:29 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
192.168.136.133 - rhys [19/Feb/2020:20:15:01 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3::132 - rhys [19/Feb/2020:20:15:33 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
192.168.136.133 - rhys [19/Feb/2020:20:16:05 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3::132 - rhys [19/Feb/2020:20:16:37 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
192.168.136.133 - rhys [19/Feb/2020:20:17:09 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3::132 - rhys [19/Feb/2020:20:17:41 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
192.168.136.133 - rhys [19/Feb/2020:20:18:13 -1000] "GET /status.php HTTP/1.0" 500 2076 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3::132 - rhys [19/Feb/2020:20:18:45 -1000] "GET /status.php HTTP/1.0" 500 2076 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
192.168.136.133 - rhys [19/Feb/2020:20:19:17 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3::132 - rhys [19/Feb/2020:20:19:49 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
192.168.136.133 - rhys [19/Feb/2020:20:20:21 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3::132 - rhys [19/Feb/2020:20:20:53 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
192.168.136.133 - rhys [19/Feb/2020:20:21:25 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3::132 - rhys [19/Feb/2020:20:21:57 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
192.168.136.133 - rhys [19/Feb/2020:20:22:29 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3::132 - rhys [19/Feb/2020:20:23:01 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
192.168.136.133 - rhys [19/Feb/2020:20:23:33 -1000] "GET /status.php HTTP/1.0" 500 2076 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3::132 - rhys [19/Feb/2020:20:24:05 -1000] "GET /status.php HTTP/1.0" 500 2076 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
192.168.136.133 - rhys [19/Feb/2020:20:24:37 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3::132 - rhys [19/Feb/2020:20:25:09 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
192.168.136.133 - rhys [19/Feb/2020:20:25:41 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3:3da7:fee9:61d4:94af - - [19/Feb/2020:20:25:56 -1000] "GET / HTTP/1.1" 200 3380 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"
2605:e000:1113:c2e3:3da7:fee9:61d4:94af - - [19/Feb/2020:20:26:00 -1000] "GET /nextcloud/ HTTP/1.1" 200 479 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"
2605:e000:1113:c2e3:3da7:fee9:61d4:94af - - [19/Feb/2020:20:26:00 -1000] "GET /nextcloud/index.php HTTP/1.1" 500 477 "http://hecate/nextcloud/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"
2605:e000:1113:c2e3::132 - rhys [19/Feb/2020:20:26:13 -1000] "GET /status.php HTTP/1.0" 500 2076 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
192.168.136.133 - rhys [19/Feb/2020:20:26:45 -1000] "GET /status.php HTTP/1.0" 500 2076 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3::132 - rhys [19/Feb/2020:20:27:17 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
192.168.136.133 - rhys [19/Feb/2020:20:27:49 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3::132 - rhys [19/Feb/2020:20:28:21 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
192.168.136.133 - rhys [19/Feb/2020:20:28:53 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3:3da7:fee9:61d4:94af - - [19/Feb/2020:20:29:07 -1000] "GET /nextcloud/index.php HTTP/1.1" 500 477 "http://hecate/nextcloud/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"
2605:e000:1113:c2e3::132 - rhys [19/Feb/2020:20:29:25 -1000] "GET /status.php HTTP/1.0" 500 3703 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3:3da7:fee9:61d4:94af - - [19/Feb/2020:20:29:36 -1000] "GET /nextcloud/index.php HTTP/1.1" 500 477 "http://hecate/nextcloud/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"
192.168.136.133 - rhys [19/Feb/2020:20:29:57 -1000] "GET /status.php HTTP/1.0" 500 3703 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3::132 - rhys [19/Feb/2020:20:30:29 -1000] "GET /status.php HTTP/1.0" 500 633 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
192.168.136.133 - rhys [19/Feb/2020:20:30:32 -1000] "GET /ocs/v2.php/core/navigation/apps?absolute=true&format=json HTTP/1.0" 200 614 "-" "Mozilla/5.0 (Linux) mirall/2.5.3git (Nextcloud)"
2605:e000:1113:c2e3:3da7:fee9:61d4:94af - - [19/Feb/2020:20:32:07 -1000] "GET /test.php HTTP/1.1" 404 485 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"
2605:e000:1113:c2e3:3da7:fee9:61d4:94af - - [19/Feb/2020:20:32:25 -1000] "GET /opcachetest.php HTTP/1.1" 404 485 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"

Not sure where else to look, thanks for reading.
Rhys

Ok, I figured it out! I’ll leave it here for posterity.
Problem was that when running Debian 10 in LXC, it enables several AppArmor features that break certain services from running. I encountered this when I isntalled, but apparently the update of mariadb undid my changes. Commenting out the following the lines in /lib/systemd/system/mariadb.service and running systemctl daemon-reload systemctl restart mysql got mariadb running again and NextCloud is working as it should.

Lines to be commented out:

ProtectSystem=full
PrivateDevices=true
ProtectHome=true

Credit where credit is due: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=920643

1 Like