Internal server error, no idea where to start

Hi all!

after a normal apt update&upgrade, I can’t no longer access my nextcloud instance, I get this error:

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.

Apache or nginx version: Apache/2.4.38
PHP version _(eg, 7.4)_: PHP 7.3.31-1

Also, I’m using the Turnkey container on Proxmox, it’s been working smoothly since more than a year.

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

php
$CONFIG = array (
  'passwordsalt' => 'xxx',
  'secret' => 'xxx$
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'xxx',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '21.0.4.1',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,

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

[Thu Oct 28 00:00:40.617566 2021] [ssl:warn] [pid 505] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Thu Oct 28 00:00:40.617898 2021] [ssl:warn] [pid 505] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Thu Oct 28 00:00:40.618014 2021] [mpm_prefork:notice] [pid 505] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Thu Oct 28 00:00:40.618018 2021] [core:notice] [pid 505] AH00094: Command line: '/usr/sbin/apache2'
[Thu Oct 28 00:07:35.867429 2021] [core:error] [pid 15081] [client 45.146.164.110:37764] AH00126: Invalid URI in request POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1

Hope someone will be able to help me, I have no idea where to start troubleshooting this, thanks in advance for any help!

Sorry i can not really help. But i think the apache2 logs necessarily not the problem.
Can you find also nextcloud logs? Can you check the correct installation of all needed apache2 modules e.g. php, …? Please compare with your used installation guide for apache2 and nextcloud.

1 Like

Thanks a lot for your reply!
Also in my opinion apache2 it’s not the problem, also the turnkey container has a self renewing https certificate with let’s encrypt

My nextcloud log it’s empty, don’t know why. Luckily I have my data backed up, if I won’t be able to solve it I’ll just wipe it all and start from scratch, but I’d love to learn how to troubleshoot it and solve the problem

Hi
Your config file shows NC21. Have you updated within the 21 branch or have you upgraded to NC22 ?
In any case, what is the status of your mysqld service ?
It looks like, at least for nc22, a memory management parameter needs to be adjusted. I learned that after getting as well an internal server error after upgrading to nc22.

1 Like

hi and thanks for your reply!

this is the mysqld status:

mariadb.service - MariaDB 10.3.31 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-10-22 17:06:08 UTC; 1 weeks 0 days ago
Docs: man:mysqld(8)
systemd - MariaDB Knowledge Base

I think I was on the NC21 because I haven’t updated it since last month

Hi
I read too quickly and I missed you got there after updating your distribution. Sorry for that.
Are you able to check what has been updated? Do you still have the same versions of Apache, php and Mariadb? Have you restarted your server?
One more thing could the change of owner of some files.