Nextcloud 16 Internal Server Error - Possibly Error 500

Nextcloud version 16
Operating system and version: Ubuntu Server 18.04.2
Apache or nginx version: apache2
PHP version (eg, 7.1): 10.1.40 MariaDB

The issue you are facing: After setting up redis following Nextcloud instructions,and rebooting, when going to my Nextcloud server webpage I see:`Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.` And cannot access the login page of my server, like expected.

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

Steps to replicate it:

Type 192.168.1.15 into URL bar and press enter.
OR
Head to public IP/Domain
OR
Sometimes happens in nextcloud app IOS

The output of your Nextcloud log in Admin > Logging:

Don't know how/what to look at via terminal ssh.

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

<?php
$CONFIG = array (
  'instanceid' => 'ocys06w72v4y',
  'passwordsalt' => 'psAxNszY+1fN+qgHQeXdDsMGCWI4z9',
  'secret' => 'mmqD5U2BJTkfwLIUmMPYvai311hWqRBWdvyeiGTBWHrhJ17Q',
  'trusted_domains' =>
  array (
    0 => '192.168.1.15',
    1 => '<my domain name>',
  ),
  'datadirectory' => '/nextcloud-data',
  'dbtype' => 'mysql',
  'version' => '16.0.1.1',
  'overwrite.cli.url' => 'http://192.168.1.15',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'censored',
  'installed' => true,
  'mail_from_address' => 'croftnas1',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'gmail.com',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpport' => '465',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpname' => 'croftnas1',
  'mail_smtppassword' => 'censored',
  'memcache.local' => '\OC\Memcache\APCu',
  'memcache.distributed' => '\OC\Memcache\Redis',
  'redis' => [
       'host'     => '/var/run/redis/redis.sock',
       'port'     => 0,
  ],
);

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

Apache access log:
https://raw.githubusercontent.com/aedan929/access.log/master/access.log

Apache error log:
https://raw.githubusercontent.com/aedan929/access.log/master/error.log

My temporary fix was deleting the code for file cache. Unfortunately, I really need this as I have a few users and have WebDAV file locking issues. This was my only remedy. Any fix on proper file cache setup would be appreciated.

I can confirm the cache-related issue here. I am in a weird situation too now on my archlinux server: it looks like php-redis is the culprit since version 5 (was working with 4.5 before). Unfortunately, no 4.5 package is available any more for archlinux since the shift from AUR to community repo… still trying to figure out a way to downgrade to 4.5…

I got the web interface of nextcloud running again after I noticed that the redis, imagick and igbinary php extensions were not loaded. After uncommenting the respective lines in the php config files, the web UI is back.
I don’t really know what changed with my package upgrades but it solved it for me!