Can't access my instance anymore after upgrading Debian

Nextcloud version (eg, 20.0.5): r27.1.2
Operating system and version (eg, Ubuntu 20.04): Debian 12
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.57
PHP version (eg, 7.4): 8.1.25

The issue you are facing:

Since one week I’ve upgraded my home server from debian 11 to debian 12 and since then, i can’t access anymore my NC instance. I have that “internal server error” page instead of my login page.

i’ve look at all logs (nextcloud, apache errors, php,) but nothing relevant is in these logs. i really don’t konw where to start looking for right now. I have important things on my NC so i hope i won’t loose them (i have backup anyway)

I’m using postgresql as nextcloud DB.

So if you have any tips where i can find some clues, it would be nice :slight_smile:

Thanks a lot

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

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

<?php
$CONFIG = array (
  'instanceid' => '*****',
  'passwordsalt' => '*****',
  'secret' => '*****',
  'trusted_domains' => 
  array (
    0 => '192.168.1.2',
    1 => 'debian-serveur-matt.lan',
  ),
  'datadirectory' => '/home/nextcloud/',
  'dbtype' => 'pgsql',
  'version' => '27.1.2.1',
  'overwrite.cli.url' => 'http://192.168.1.2/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.1.2:5432',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '*****',
  'dbpassword' => '*****',
  'installed' => true,
  'default_phone_region' => 'FR',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
  'memories.exiftool' => '/var/www/html/nextcloud/apps/memories/exiftool-bin/exiftool-amd64-glibc',
  'memories.vod.path' => '/var/www/html/nextcloud/apps/memories/exiftool-bin/go-vod-amd64',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
);


An internal server error is always logged somewhere. If it’s getting to the Nextcloud Server app, it’ll be in /home/nextcloud/nextcloud.log based on your provided configuration. I would, however, change your loglevel to something more reasonable (like 2) otherwise you’ll be overwhelmed with unnecessary logging.

If Nextcloud has no logging then it’s not getting that far. So check your Apache logs.

I’ve finally rollback my timeshift backup and i’m back on debian 11.
I will put this aside and try the upgrade later.

Thanks anyway

1 Like

I’ve just come across this same issue. I’ve been running Debian 10 for years, and finally got around to upgrading. Upgraded to Debian 11, did a check across all my services and all working OK, including Nextcloud. Then upgraded to Debian 12 and am now getting internal server error, with the following entry in the apache log:

AH01276: Cannot serve directory /nas/nextcloud: No matching DirectoryIndex (none) found, and server-generated directory index forbidden by Options directive

This is the relevant section in my apache conf:

Alias "/nextcloud" "/nas/nextcloud"
<Directory "/nas/nextcloud">
        <FilesMatch \.php>
                SetHandler "proxy:unix:/var/run/php/php8.2-fpm.sock|fcgi://localhost/"
        </FilesMatch>
        DirectoryIndex index.php
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

And in the /nas/nextcloud/.htaccess there is also this:

<IfModule mod_dir.c>
  DirectoryIndex index.php index.html
</IfModule>

I don’t see any other errors generated anywhere and am at a bit of a loss

If you upgraded to Debian 12 your PHP version likely changed. There could be many possibilities.

Please check your nextcloud.log to see if Nextcloud is even functioning at all.

You also appear to be using PHP-FPM so you need to check the state of that service.

Your Apache config looks a bit odd. It is highly unusual to have Indexes on. If anything you’d have them off normally.

Apache docs: Installation on Linux — Nextcloud latest Administration Manual latest documentation