Internal Server Error contact your admin

Dear Nextcloud community,

A month ago i stumpled accross my first issue with nextcloud. After i had given the correct login details for the admin, the webpage was loading but not logging in for an infinte amount of time. After this i decided it would be a good idea to restart the debian server and run os updates. After this i ended up with the internal server error message when trying to open the nextcloud.

Any help would be appreciated. Thanks in advance.


Logging

Nextcloud version (not sure, thats what i got from config.php): 23.0.6.1
Operating system and version: Debian GNU/Linux 11 (bullseye)
Apache or nginx version : Apache/2.4.56
PHP version : 7.4.33

The issue you are facing:

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

Steps to replicate it:

  1. Open Nextcloud URL
  2. Get the Error Message:

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.

The output of your Nextcloud log in Admin > Logging:


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

<?php
$CONFIG = array (
  'instanceid' => 'redacted',
  'passwordsalt' => 'redacted',
  'secret' => 'redacted',
  'trusted_domains' =>
  array (
    0 => 'cloud.n3rd43v3er.de',
  ),
  'datadirectory' => '/var/www/cloud.n3rd43v3er.de/data',
  'dbtype' => 'mysql',
  'version' => '23.0.6.1',
  'overwrite.cli.url' => 'http://cloud.n3rd43v3er.de',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'redacted',
  'dbpassword' => 'redacted',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
);

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

[Sun Jan 14 10:15:33.508857 2024] [mpm_prefork:notice] [pid 817] AH00163: Apache/2.4.56 (Debian) OpenSSL/1.1.1w configured -- resuming normal operations
[Sun Jan 14 10:15:33.508907 2024] [core:notice] [pid 817] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jan 14 10:15:51.687880 2024] [authz_core:error] [pid 263739] [client IPredacted:55592] AH01630: client denied by server configuration: /var/www/cloud.n3rd43v3er.de/server-status
[Sun Jan 14 17:38:52.903247 2024] [access_compat:error] [pid 263743] [client IPredacted:51824] AH01797: client denied by server configuration: /var/www/cloud.n3rd43v3er.de/config/getuser
[Mon Jan 15 18:07:38.508739 2024] [ssl:error] [pid 263740] [client IPredacted:41632] AH02042: rejecting client initiated renegotiation
[Tue Jan 16 01:10:07.109043 2024] [php7:error] [pid 263741] [client IPredacted:49800] script '/var/www/cloud.n3rd43v3er.de/wp-login.php' not found or unable to stat, referer: http://cloud.n3rd43v3er.de/wp-login.php
[Tue Jan 16 06:16:42.981439 2024] [php7:error] [pid 263744] [client IPredacted:27516] script '/var/www/cloud.n3rd43v3er.de/portal.php' not found or unable to stat, referer: http://IPredacted:80/c/
[Tue Jan 16 06:16:43.313196 2024] [php7:error] [pid 263732] [client IPredacted:27529] script '/var/www/cloud.n3rd43v3er.de/portal.php' not found or unable to stat, referer: http://IPredacted:80/c/
[Tue Jan 16 07:56:30.019107 2024] [access_compat:error] [pid 263740] [client IPredacted:54482] AH01797: client denied by server configuration: /var/www/cloud.n3rd43v3er.de/config/getuser

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.


file":"/var/www/cloud.n3rd43v3er.de/index.php","line":34,"args":["/var/www/cloud.n3rd43v3er.de/lib/base.php"],"function":"require_once"}],"File":"/var/www/cloud.n3rd43v3er.de/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":143,"CustomMessage":"--"}}
{"reqId":"HavQtFaaeqyEqX0sEAxr","level":0,"time":"2023-12-26T02:57:50+00:00","remoteAddr":"redacted","user":"--","app":"scss_cacher","method":"GET","url":"http://redacted:80/phpMyAdmin-2.6.2-rc1/","message":"SCSSCacher::process ordinary check follows","userAgent":"Mozilla/5.0 walick","version":"23.0.6.1"}
{"reqId":"HavQtFaaeqyEqX0sEAxr","level":0,"time":"2023-12-26T02:57:50+00:00","remoteAddr":"redacted","user":"--","app":"scss_cacher","method":"GET","url":"http://redacted:80/phpMyAdmin-2.6.2-rc1/","message":"SCSSCacher::isCached 15f1-0ab5-server.css isCachedCache is expired or unset","userAgent":"Mozilla/5.0 walick","version":"23.0.6.1"}
{"reqId":"HavQtFaaeqyEqX0sEAxr","level":0,"time":"2023-12-26T02:57:50+00:00","remoteAddr":"redacted","user":"--","app":"scss_cacher","method":"GET","url":"http://redacted:80/phpMyAdmin-2.6.2-rc1/","message":"SCSSCacher::isCached 15f1-0ab5-server.css dependencies successfully cached for 5 minutes","userAgent":"Mozilla/5.0 walick","version":"23.0.6.1"}
{"reqId":"HavQtFaaeqyEqX0sEAxr","level":0,"time":"2023-12-26T02:57:50+00:00","remoteAddr":"redacted","user":"--","app":"scss_cacher","method":"GET","url":"http://redacted:80/phpMyAdmin-2.6.2-rc1/","message":"SCSSCacher::process ordinary check follows","userAgent":"Mozilla/5.0 walick","version":"23.0.6.1"}
{"reqId":"HavQtFaaeqyEqX0sEAxr","level":0,"time":"2023-12-26T02:57:50+00:00","remoteAddr":"redacted","user":"--","app":"scss_cacher","method":"GET","url":"http://redacted:80/phpMyAdmin-2.6.2-rc1/","message":"SCSSCacher::isCached 15f1-0ab5-css-variables.css isCachedCache is expired or unset","userAgent":"Mozilla/5.0 walick","version":"23.0.6.1"}
{"reqId":"HavQtFaaeqyEqX0sEAxr","level":0,"time":"2023-12-26T02:57:50+00:00","remoteAddr":"redacted","user":"--","app":"scss_cacher","method":"GET","url":"http://redacted:80/phpMyAdmin-2.6.2-rc1/","message":"SCSSCacher::isCached 15f1-0ab5-css-variables.css dependencies successfully cached for 5 minutes","userAgent":"Mozilla/5.0 walick","version":"23.0.6.1"}
{"reqId":"fG3eXQSg2voRhvicl5cJ","level":1,"time":"2023-12-26T02:57:50+00:00","remoteAddr":"redacted","user":"--","app":"core","method":"GET","url":"http://redacted:80/phpMyAdmin-2.6.2-beta1/","message":"Trusted domain error. \"redacted\" tried to access using \"redacted:80\" as host.","userAgent":"Mozilla/5.0 walick","version":"23.0.6.1"}
{"reqId":"fG3eXQSg2voRhvicl5cJ","level":1,"time":"2023-12-26T02:57:50+00:00","remoteAddr":"redacted","user":"--","app":"no app in context","method":"GET","url":"http://redacted:80/phpMyAdmin-2.6.2-beta1/","message":"Unable to generate a URL for the named route \"ocs.password_policy.API.generate\" as such route does not exist.","userAgent":"Mozilla/5.0 walick","version":"23.0.6.1","exception":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"ocs.password_policy.API.generate\" as such route does not exist.","Code":0,"Trace":[{"file":"/var/www/cloud.n3rd43v3er.de/lib/private/Route/Router.php","line":365,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/lib/private/URLGenerator.php","line":107,"function":"generate","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/apps/password_policy/lib/Capabilities.php","line":58,"function":"linkToOCSRouteAbsolute","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/lib/private/CapabilitiesManager.php","line":69,"function":"getCapabilities","class":"OCA\\Password_Policy\\Capabilities","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/lib/private/Template/JSConfigHelper.php","line":190,"function":"getCapabilities","class":"OC\\CapabilitiesManager","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/lib/private/TemplateLayout.php","line":234,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/lib/private/legacy/OC_Template.php","line":182,"function":"__construct","class":"OC\\TemplateLayout","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/lib/base.php","line":788,"function":"printPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/lib/base.php","line":1089,"function":"init","class":"OC","type":"::"},{"file":"/var/www/cloud.n3rd43v3er.de/index.php","line":34,"args":["/var/www/cloud.n3rd43v3er.de/lib/base.php"],"function":"require_once"}],"File":"/var/www/cloud.n3rd43v3er.de/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":143,"CustomMessage":"--"}}
{"reqId":"fG3eXQSg2voRhvicl5cJ","level":1,"time":"2023-12-26T02:57:50+00:00","remoteAddr":"redacted","user":"--","app":"no app in context","method":"GET","url":"http://redacted:80/phpMyAdmin-2.6.2-beta1/","message":"Unable to generate a URL for the named route \"ocs.password_policy.API.validate\" as such route does not exist.","userAgent":"Mozilla/5.0 walick","version":"23.0.6.1","exception":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"ocs.password_policy.API.validate\" as such route does not exist.","Code":0,"Trace":[{"file":"/var/www/cloud.n3rd43v3er.de/lib/private/Route/Router.php","line":365,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/lib/private/URLGenerator.php","line":107,"function":"generate","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/apps/password_policy/lib/Capabilities.php","line":59,"function":"linkToOCSRouteAbsolute","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/lib/private/CapabilitiesManager.php","line":69,"function":"getCapabilities","class":"OCA\\Password_Policy\\Capabilities","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/lib/private/Template/JSConfigHelper.php","line":190,"function":"getCapabilities","class":"OC\\CapabilitiesManager","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/lib/private/TemplateLayout.php","line":234,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/lib/private/legacy/OC_Template.php","line":182,"function":"__construct","class":"OC\\TemplateLayout","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/lib/base.php","line":788,"function":"printPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/cloud.n3rd43v3er.de/lib/base.php","line":1089,"function":"init","class":"OC","type":"::"},{"file":"/var/www/cloud.n3rd43v3er.de/index.php","line":34,"args":["/var/www/cloud.n3rd43v3er.de/lib/base.php"],"function":"require_once"}],"File":"/var/www/cloud.n3rd43v3er.de/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":143,"CustomMessage":"--"}}
{"reqId":"fG3eXQSg2voRhvicl5cJ","level":0,"time":"2023-12-26T02:57:50+00:00","remoteAddr":"redacted","user":"--","app":"scss_cacher","method":"GET","url":"http://redacted:80/phpMyAdmin-2.6.2-beta1/","message":"SCSSCacher::process ordinary check follows","userAgent":"Mozilla/5.0 walick","version":"23.0.6.1"}
{"reqId":"fG3eXQSg2voRhvicl5cJ","level":0,"time":"2023-12-26T02:57:50+00:00","remoteAddr":"redacted","user":"--","app":"scss_cacher","method":"GET","url":"http://redacted:80/phpMyAdmin-2.6.2-beta1/","message":"SCSSCacher::isCached 15f1-0ab5-server.css isCachedCache is expired or unset","userAgent":"Mozilla/5.0 walick","version":"23.0.6.1"}
{"reqId":"fG3eXQSg2voRhvicl5cJ","level":0,"time":"2023-12-26T02:57:50+00:00","remoteAddr":"redacted","user":"--","app":"scss_cacher","method":"GET","url":"http://redacted:80/phpMyAdmin-2.6.2-beta1/","message":"SCSSCacher::isCached 15f1-0ab5-server.css dependencies successfully cached for 5 minutes","userAgent":"Mozilla/5.0 walick","version":"23.0.6.1"}
{"reqId":"fG3eXQSg2voRhvicl5cJ","level":0,"time":"2023-12-26T02:57:50+00:00","remoteAddr":"redacted","user":"--","app":"scss_cacher","method":"GET","url":"http://redacted:80/phpMyAdmin-2.6.2-beta1/","message":"SCSSCacher::process ordinary check follows","userAgent":"Mozilla/5.0 walick","version":"23.0.6.1"}
{"reqId":"fG3eXQSg2voRhvicl5cJ","level":0,"time":"2023-12-26T02:57:50+00:00","remoteAddr":"redacted","user":"--","app":"scss_cacher","method":"GET","url":"http://redacted:80/phpMyAdmin-2.6.2-beta1/","message":"SCSSCacher::isCached 15f1-0ab5-css-variables.css isCachedCache is expired or unset","userAgent":"Mozilla/5.0 walick","version":"23.0.6.1"}
{"reqId":"fG3eXQSg2voRhvicl5cJ","level":0,"time":"2023-12-26T02:57:50+00:00","remoteAddr":"redacted","user":"--","app":"scss_cacher","method":"GET","url":"http://redacted:80/phpMyAdmin-2.6.2-beta1/","message":"SCSSCacher::isCached 15f1-0ab5-css-variables.css dependencies successfully cached for 5 minutes","userAgent":"Mozilla/5.0 walick","version":"23.0.6.1"}
{"reqId":"vJICgSU0jPNjezT2spQ5","level":1,"time":"2023-12-26T02:57:50+00:00","remoteAddr":"redacted","user":"--","app":"core","method":"GET","url":"http://redacted:80/phpMyAdmin-2.6.2-rc1/","message":"Trusted domain error. \"redacted\" tried to access using \"redacted:80\" as host.","userAgent":"Mozilla/5.0 walick","version":"23.0.6.1"}

That’s a pitfall for a host of problems. You should keep your OS up to date on a daily basis and not suddenly update it blindly when an application causes problems. The cause of it should first be researched before potentially new causes are created.
But no matter, now you at least have a current debian and have a full overview of the installed php versions (I hope)

Nextcloud 23 is EOL. It is not longer supported and you do not even have the latest patch level of 23, which is 23.0.12.

I would strongly recommend that you update to a more current version that is still supported (minimum 26) and therefore also includes the latest bug fixes and security updates.


Much and good luck,
ernolf

I would rather try to fix the problem in this version first and then start the upgrade process.

Is upgrade in this state a good idea. It might again cause new problems like you mentioned the os update may have invoked.

You have set the log level of your nextcloud logfile to 0, which means your log file is flooded with absolutely unimportant events what makes it difficult to find the right errors.
The few lines you posted here are all from level 0 or 1. It only becomes interesting from level 2 at the earliest and if it is already a level 3 error, then that may say something more about the error in question.

But what can be read from the Apache error.log, is that you have messed with the settings of your Apache2 server.
An attempt was made to call “server-status”, which is provided by the mod_status module and normally involves access control. This might mess up all the access permissions on your server and that’s why you get “client denied by server configuration”

Nextcloud itself should not have any access control rules (typically set as Require all granted). However, the activation of mod_status seems to have triggered an unintended access control.

To address this issue, follow these steps:

Review Apache Configuration:
Verify the Apache configuration files, especially the one related to mod_status. Check for any access control directives that might have been inadvertently added or modified. Ensure that they do not conflict with the permissive access control settings required by Nextcloud.

Disable mod_status Module (at least temporarily):

sudo a2disconf status
sudo systemctl reload apache2

… to eliminate the unintended access control.

Confirm that Nextcloud’s access control settings are correctly configured to allow unrestricted access (Require all granted). Verify this in Nextcloud’s configuration files.


I hope this solves your issue


Much and good luck,
ernolf