HTTP error 500 after upgrade from Ubuntu 16.04 to 18.04

After upgrading my Ubuntu 16.04 LTS server to Ubuntu 18.04 LTS server today, I am experiencing HTTP 500 error codes when accessing my Nextcloud 15.0 installation in the browser.

This is with an Apache web server.

The occ command works fine! As does all other stuff on the same server, which includes MediaWiki, another complex PHP application.

Unfortunately, besides the 500 error, there is absolutely nothing of value in the Apache log file; I even tuned up the log level to trace4.

As it seems, Nextcloud itself does work (I can use the occ script). Something is wrong with the web server, which continues to serve all other applications just fine.

Does anybody have any idea what might be going on?

I finally managed to get a more meaningful error message by hacking index.php in the NC root folder:

equire_once __DIR__ . '/lib/versioncheck.php';

try {

        require_once __DIR__ . '/lib/base.php';

        OC::handleRequest();

} catch(\OC\ServiceUnavailableException $ex) {
        \OC::$server->getLogger()->logException($ex, array('app' => 'index'));

        //show the user a detailed error page
        OC_Template::printExceptionErrorPage($ex, 503);
} catch (\OC\HintException $ex) {
        // ####################################################
        // ####### added by me ################################
        die($ex);
        // ####################################################
        try {
                OC_Template::printErrorPage($ex->getMessage(), $ex->getHint(), 503);
        } catch (Exception $ex2) {
                try {
                        \OC::$server->getLogger()->logException($ex, array('app' => 'index'));
                        \OC::$server->getLogger()->logException($ex2, array('app' => 'index'));
                } catch (Throwable $e) {
                        // no way to log it properly - but to avoid a white page of death we try harder and ignore this one here
                }

                //show the user a detailed error page
                OC_Template::printExceptionErrorPage($ex, 500);
        }

Aborting the script with die($ex) finally informed my that the php-apcu evidently had gone AWOL during the Ubuntu upgrade. Installed it with sudo apt install php-apcu, problem solved.

Thank for sharing.

If this is solved, please, mark you post as solved.