After updating the server, Nextcloud does not work:Internal Server Error

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 19.0.13.1
Operating system and version (eg, Ubuntu 20.04): Rocky linux 8.5
Apache or nginx version (eg, Apache 2.4.25): apache 2.4.37
PHP version (eg, 7.4): 7.4.27

The issue you are facing:
When trying to enter the application it throws the message: Internal Server Error.
Before updating the application it worked correctly.
Nextcloud’s log file does not have any messages.
What can I do to fix it? can you help me?
Thanks.

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

Steps to replicate it:

  1. Backup MariaDB
  2. Upgrade CentOS7 to Rocky Linux 8.5
  3. install necessary apache modules
  4. install necessary php 7.4 modules
  5. Check operation of apache
  6. Check operation of php 7.4
  7. import DB to mariadb
  8. Perform mysql_upgrade

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

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

<?php
$CONFIG = array (
  'instanceid' => 'xxxxxxxxx',
  'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxxxxxx',
  'trusted_domains' =>
  array (
    0 => '192.168.xxx.x82',
    1 => 'webservice.mail.com',
    2 => 'box.mail.com',
    3 => 'box',
  ),
  'datadirectory' => '/u/NextcloudData',
  'dbtype' => 'mysql',
  'version' => '19.0.13.1',
  'overwrite.cli.url' => 'http://192.168.xxx.x82',
  'htaccess.RewriteBase' => '/',
  'dbname' => 'nextcloudDB',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'cloudnext',
  'dbpassword' => 'xxxxxxxxxxxx',
  'installed' => true,
  'maintenance' => false,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'mysql.utf8mb4' => true,
  'theme' => '',
  'log_type" => 'file',
  'logfile" => 'nextcloud.log',
  'loglevel' => 0,
  'updater.secret' => 'xxxxxxxxxxxxxxxxxSxp1w0tP7L8xxxxxxxxxxVsmBpwS',
  'mail_from_address' => 'noreply',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'mail.com',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'mail.mail.com',
  'mail_smtpport' => '25',
  'mail_smtpname' => 'mail@mail.com',
  'mail_smtppassword' => 'xxxxxxxxxxx',
);

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

[Thu Dec 30 08:23:11.547972 2021] [proxy:debug] [pid 4438:tid 140651350181632] proxy_util.c(2394): [client 90.167.94.198:8353] AH00944: connecting fcgi://localhost/var/www/html/nextcloud/remote.php to localhost:8000
[Thu Dec 30 08:23:11.547980 2021] [proxy:debug] [pid 4438:tid 140651350181632] proxy_util.c(2431): [client 90.167.94.198:8353] AH02545: fcgi: has determined UDS as /run/php-fpm/www.sock
[Thu Dec 30 08:23:11.548106 2021] [proxy:debug] [pid 4438:tid 140651350181632] proxy_util.c(2620): [client 90.167.94.198:8353] AH00947: connected /var/www/html/nextcloud/remote.php to httpd-UDS:0
[Thu Dec 30 08:23:11.548164 2021] [proxy:debug] [pid 4438:tid 140651350181632] proxy_util.c(2992): AH02823: FCGI: connection established with Unix domain socket /run/php-fpm/www.sock (*)
[Thu Dec 30 08:23:11.548264 2021] [authz_core:debug] [pid 4438:tid 140651350181632] mod_authz_core.c(820): [client 90.167.94.198:8353] AH01626: authorization result of Require all granted: granted
[Thu Dec 30 08:23:11.548274 2021] [authz_core:debug] [pid 4438:tid 140651350181632] mod_authz_core.c(820): [client 90.167.94.198:8353] AH01626: authorization result of <RequireAny>: granted
[Thu Dec 30 08:23:11.549635 2021] [proxy:debug] [pid 4438:tid 140651350181632] proxy_util.c(2354): AH00943: FCGI: has released connection for (*)
[Thu Dec 30 08:23:11.711548 2021] [authz_core:debug] [pid 4438:tid 140651358574336] mod_authz_core.c(820): [client 90.167.94.198:8344] AH01626: authorization result of Require all granted: granted
[Thu Dec 30 08:23:11.711575 2021] [authz_core:debug] [pid 4438:tid 140651358574336] mod_authz_core.c(820): [client 90.167.94.198:8344] AH01626: authorization result of <RequireAny>: granted
[Thu Dec 30 08:23:11.711627 2021] [proxy:debug] [pid 4438:tid 140651358574336] mod_proxy.c(1264): [client 90.167.94.198:8344] AH01143: Running scheme unix handler (attempt 0)
[Thu Dec 30 08:23:11.711664 2021] [proxy_ajp:debug] [pid 4438:tid 140651358574336] mod_proxy_ajp.c(743): [client 90.167.94.198:8344] AH00894: declining URL fcgi://localhost/var/www/html/nextcloud/remote.php
[Thu Dec 30 08:23:11.711675 2021] [proxy_fcgi:debug] [pid 4438:tid 140651358574336] mod_proxy_fcgi.c(1021): [client 90.167.94.198:8344] AH01076: url: fcgi://localhost/var/www/html/nextcloud/remote.php proxyname: (null) proxyport: 0
[Thu Dec 30 08:23:11.711680 2021] [proxy_fcgi:debug] [pid 4438:tid 140651358574336] mod_proxy_fcgi.c(1028): [client 90.167.94.198:8344] AH01078: serving URL fcgi://localhost/var/www/html/nextcloud/remote.php
[Thu Dec 30 08:23:11.711686 2021] [proxy:debug] [pid 4438:tid 140651358574336] proxy_util.c(2339): AH00942: FCGI: has acquired connection for (*)
[Thu Dec 30 08:23:11.711694 2021] [proxy:debug] [pid 4438:tid 140651358574336] proxy_util.c(2394): [client 90.167.94.198:8344] AH00944: connecting fcgi://localhost/var/www/html/nextcloud/remote.php to localhost:8000
[Thu Dec 30 08:23:11.711700 2021] [proxy:debug] [pid 4438:tid 140651358574336] proxy_util.c(2431): [client 90.167.94.198:8344] AH02545: fcgi: has determined UDS as /run/php-fpm/www.sock
[Thu Dec 30 08:23:11.711803 2021] [proxy:debug] [pid 4438:tid 140651358574336] proxy_util.c(2620): [client 90.167.94.198:8344] AH00947: connected /var/www/html/nextcloud/remote.php to httpd-UDS:0
[Thu Dec 30 08:23:11.711834 2021] [proxy:debug] [pid 4438:tid 140651358574336] proxy_util.c(2992): AH02823: FCGI: connection established with Unix domain socket /run/php-fpm/www.sock (*)
[Thu Dec 30 08:23:11.711926 2021] [authz_core:debug] [pid 4438:tid 140651358574336] mod_authz_core.c(820): [client 90.167.94.198:8344] AH01626: authorization result of Require all granted: granted
[Thu Dec 30 08:23:11.711934 2021] [authz_core:debug] [pid 4438:tid 140651358574336] mod_authz_core.c(820): [client 90.167.94.198:8344] AH01626: authorization result of <RequireAny>: granted
[Thu Dec 30 08:23:11.712739 2021] [proxy:debug] [pid 4438:tid 140651358574336] proxy_util.c(2354): AH00943: FCGI: has released connection for (*)
[Thu Dec 30 08:23:20.905215 2021] [authz_core:debug] [pid 4438:tid 140651375359744] mod_authz_core.c(820): [client 192.168.100.18:60357] AH01626: authorization result of Require all granted: granted
[Thu Dec 30 08:23:20.905255 2021] [authz_core:debug] [pid 4438:tid 140651375359744] mod_authz_core.c(820): [client 192.168.100.18:60357] AH01626: authorization result of <RequireAny>: granted
[Thu Dec 30 08:23:20.905302 2021] [proxy:debug] [pid 4438:tid 140651375359744] mod_proxy.c(1264): [client 192.168.100.18:60357] AH01143: Running scheme unix handler (attempt 0)
[Thu Dec 30 08:23:20.905312 2021] [proxy_ajp:debug] [pid 4438:tid 140651375359744] mod_proxy_ajp.c(743): [client 192.168.100.18:60357] AH00894: declining URL fcgi://localhost/var/www/html/nextcloud/status.php
[Thu Dec 30 08:23:20.905318 2021] [proxy_fcgi:debug] [pid 4438:tid 140651375359744] mod_proxy_fcgi.c(1021): [client 192.168.100.18:60357] AH01076: url: fcgi://localhost/var/www/html/nextcloud/status.php proxyname: (null) proxyport: 0
[Thu Dec 30 08:23:20.905324 2021] [proxy_fcgi:debug] [pid 4438:tid 140651375359744] mod_proxy_fcgi.c(1028): [client 192.168.100.18:60357] AH01078: serving URL fcgi://localhost/var/www/html/nextcloud/status.php
[Thu Dec 30 08:23:20.905330 2021] [proxy:debug] [pid 4438:tid 140651375359744] proxy_util.c(2339): AH00942: FCGI: has acquired connection for (*)
[Thu Dec 30 08:23:20.905337 2021] [proxy:debug] [pid 4438:tid 140651375359744] proxy_util.c(2394): [client 192.168.100.18:60357] AH00944: connecting fcgi://localhost/var/www/html/nextcloud/status.php to localhost:8000
[Thu Dec 30 08:23:20.905343 2021] [proxy:debug] [pid 4438:tid 140651375359744] proxy_util.c(2431): [client 192.168.100.18:60357] AH02545: fcgi: has determined UDS as /run/php-fpm/www.sock
[Thu Dec 30 08:23:20.905448 2021] [proxy:debug] [pid 4438:tid 140651375359744] proxy_util.c(2620): [client 192.168.100.18:60357] AH00947: connected /var/www/html/nextcloud/status.php to httpd-UDS:0
[Thu Dec 30 08:23:20.905493 2021] [proxy:debug] [pid 4438:tid 140651375359744] proxy_util.c(2992): AH02823: FCGI: connection established with Unix domain socket /run/php-fpm/www.sock (*)
[Thu Dec 30 08:23:20.906310 2021] [proxy:debug] [pid 4438:tid 140651375359744] proxy_util.c(2354): AH00943: FCGI: has released connection for (*)

Hello, I have tried a new installation with the same version of the application to verify that all the requirements are met and that everything works fine. The installation was successful.
In nexcloud.log no new data.
How can I debug to know what is happening?
Thanks

I have decided that comparing the configuration files between the production installation and the new one, which I did test, could be a good starting point.
When comparing them, I have seen that in the new installation there is no reference to the redis service. So I have removed the following lines from the config file:

'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),

This has not been enough. So I have noticed that in the configuration file of the new installation this line did not exist:

 'htaccess.RewriteBase' => '/',

So I decided to delete it and … VOILA !!!
Nextcloud is already working.

Thanks to all of you who have read this post.
I hope someone else will use it.