Internal Server Error - Owncloud 9.0.2.2

Please help us by providing the following info. Before posting please also check the pinned "Known issues" threads and make sure that you're running the latest available version for your oC release: https://owncloud.org/changelog/

Steps to reproduce
1. Just typing in private ip

Expected behaviour
Should, in theory just open the owncloud webpage as it has done before.

Actual behaviour
Gives me the "Internal Server Error" Error.

Server configuration
Operating system: Debian
Web server: ownCloud
Database:
PHP version:
ownCloud version (see ownCloud admin page): 9.0.2.2
Updated from an older ownCloud or fresh install: Fresh
Special configuration (external storage, external authentication, reverse proxy, server-side-encryption): external storage of 1TB drive

ownCloud configuration

Go to the admin page, click on 'admin' -> 'Generate Config Report' -> 'Download ownCloud config report' or use the command line `sudo -u www-data php occ config:list system` (please sanitize sensitive data):

ownCloud log (data/owncloud.log)

Please paste possible errors in the following code block, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808 for more info

{"reqId":"q\/r2BI1GKBbEG3bp9qzc","remoteAddr":"192.168.1.4","app":"PHP","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated an$
{"reqId":"\/hLYlW6dwcLJy\/1\/rZCj","remoteAddr":"192.168.1.4","app":"PHP","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated $
{"reqId":"yfD1RzHHonkAUsRSrsJT","remoteAddr":"192.168.1.4","app":"PHP","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and$
{"reqId":"nLI8uutphPthCiZ+Ku4v","remoteAddr":"192.168.1.4","app":"PHP","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and$
{"reqId":"fGfggGkanLc5TjgtI4nx","remoteAddr":"192.168.1.4","app":"PHP","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and$
{"reqId":"DjlmyHN\/brBHYz0ZP9fm","remoteAddr":"192.168.1.4","app":"PHP","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated an$
{"reqId":"F82EouuZkTAKQLjrFNBM","remoteAddr":"192.168.1.4","app":"PHP","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and$
{"reqId":"VfE3MN+nfGqBWlLqXXeE","remoteAddr":"192.168.1.4","app":"PHP","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and$
{"reqId":"obeAZWr4Wo0oW3OV4s0W","remoteAddr":"192.168.1.4","app":"PHP","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and$
{"reqId":"k7tnsdp4AobODfkn+xUe","remoteAddr":"192.168.1.4","app":"PHP","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and$
{"reqId":"xw2pTeYcFxsK4YMgloaY","remoteAddr":"192.168.1.4","app":"PHP","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and$
{"reqId":"hhM3tehGwu1P6LFTxxqY","remoteAddr":"192.168.1.4","app":"no app in context","message":"Exception: {\"Exception\":\"DomainException\",\"$
$\",\"Line\":68}","level":3,"time":"2017-04-27T21:17:07+00:00","method":"POST","url":"\/index.php","user":"--"}

Integrity status for oC9+

Login as admin user into your ownCloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.
##Cannot do this as no access

Check your webserver logfile for internal server errors

And if you find an error, check with a current version first: https://owncloud.org/changelog/#latest9.0

I tried to reinstall the newest version (Owncloud 10.0.0) using a fresh install of everything and now am having these errors returned after managing to setup the admin account. I tried to click on an image and this page showed up:

Exception occurred while logging exception: Failed to connect to the database: An exception occurred while executing 'PRAGMA journal_mode = WAL': SQLSTATE[HY000]: General error: 14 unable to open database file
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(992): OC\DB\Connection->connect()
#1 /var/www/owncloud/lib/private/DB/Connection.php(211): Doctrine\DBAL\Connection->executeUpdate('PRAGMA read_unc...', Array, Array)
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): OC\DB\Connection->executeUpdate('PRAGMA read_unc...')
#3 /var/www/owncloud/lib/private/DB/Connection.php(146): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#4 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOSqlite\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#5 /var/www/owncloud/lib/private/DB/ConnectionFactory.php(138): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#6 /var/www/owncloud/lib/private/Server.php(461): OC\DB\ConnectionFactory->getConnection('sqlite3', Array)
#7 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#8 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(111): Pimple\Container->offsetGet('DatabaseConnect...')
#9 /var/www/owncloud/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('DatabaseConnect...')
#10 /var/www/owncloud/lib/private/Server.php(1101): OC\ServerContainer->query('DatabaseConnect...')
#11 /var/www/owncloud/lib/private/Server.php(226): OC\Server->getDatabaseConnection()
#12 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#13 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(111): Pimple\Container->offsetGet('UserManager')
#14 /var/www/owncloud/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('UserManager')
#15 /var/www/owncloud/lib/private/Server.php(953): OC\ServerContainer->query('UserManager')
#16 /var/www/owncloud/lib/private/Server.php(267): OC\Server->getUserManager()
#17 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#18 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(111): Pimple\Container->offsetGet('UserSession')
#19 /var/www/owncloud/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('UserSession')
#20 /var/www/owncloud/lib/private/Server.php(970): OC\ServerContainer->query('UserSession')
#21 /var/www/owncloud/lib/private/Server.php(507): OC\Server->getUserSession()
#22 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#23 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(111): Pimple\Container->offsetGet('AppManager')
#24 /var/www/owncloud/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('AppManager')
#25 /var/www/owncloud/lib/private/Server.php(1288): OC\ServerContainer->query('AppManager')
#26 /var/www/owncloud/lib/private/legacy/app.php(310): OC\Server->getAppManager()
#27 /var/www/owncloud/lib/private/legacy/app.php(106): OC_App::getEnabledApps()
#28 /var/www/owncloud/lib/base.php(579): OC_App::loadApps(Array)
#29 /var/www/owncloud/lib/base.php(994): OC::init()
#30 /var/www/owncloud/index.php(47): require_once('/var/www/ownclo...')
#31 {main}

You are sure the database is running correctly and is not corrupt. Can you access the database via phpmyadmin?

I should add that the system had been working until early Sunday morning. I restored the database and the owncloud directory to a time before the fault (or I thought so), but no joy. Also, there is nothing in the apache2 logs at all indicating the error and nothing in the log -- i.e. I looked at the log before and after the attempt and no change.

It's very unlikely that if you get an "Internal Server Error" that your webserver error logfile does not contain any information (a full disk or quota perhaps). Nothing in your database-logs?
Did you try phpmyadmin or any other php application that uses the database, if any of them can connect properly to the database?