Internal server error without any logging

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via 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:


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


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): 21.0.1
Operating system and version (eg, Ubuntu 20.04): raspbian
Apache or nginx version (eg, Apache 2.4.25): apache 2.4.38
PHP version (eg, 7.4): 7.3

The issue you are facing: Internal server error

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

Steps to replicate it:

  1. Access nextcloud/ through browser or
  2. sudo -u www-data php /srv/www/nextcloud/index.php
  3. Step 2 results in the error below, step 1 produces no logging

The output of your Nextcloud log in Admin > Logging:

{"reqId":"4ZBmvivA03o3zG7EQ8cK","level":3,"time":"2021-04-16T12:29:32+00:00","remoteAddr":"","user":"--","app":"index","method":"","url":"--","message":{"Exception":"Exception","Message":"The requested uri() cannot be processed by the script '/srv/www/nextcloud/index.php')","Code":0,"Trace":[{"file":"/srv/www/nextcloud/lib/base.php","line":937,"function":"getRawPathInfo","class":"OC\\AppFramework\\Http\\Request","type":"->","args":[]},{"file":"/srv/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/srv/www/nextcloud/lib/private/AppFramework/Http/Request.php","Line":784,"CustomMessage":"--"},"userAgent":"--","version":""}

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

$CONFIG = array (
  'instanceid' => 'instance',
  'passwordsalt' => 'salt',
  'secret' => 'secret',
  'trusted_domains' => 
  array (
    0 => 'my_ip',
  'datadirectory' => '/srv/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'http://my_ip/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'dbuser',
  'dbpassword' => 'dbpassword',
  'installed' => true,
  'log_level' => '2',

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


Additional information: With occ I can read user info and settings. It is a clean install and has worked for 2 days. Any pointers highly appreciated.

1 Like

Hey mate, hope you are doing well…

Let’s try to fix your issue here…

But first, one question: Do you have any cache service running? Example: Redis.

You can try this:

1) sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on
2) chown -R www-data:www-data /var/www/nextcloud/
3) chmod -R 770 /var/www/nextcloud/
4) sudo -u www-data php /var/www/nextcloud/occ maintenance:repair
5) sudo -u www-data php /var/www/nextcloud/occ db:add-missing-columns
6) sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices
7) sudo -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess
8) sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off
9) sudo systemctl restart apache2

Also, check your php version running “php -v”, that can help a lot.

Make sure you have php-fpm installed and running.

Hope this helps, have a nice weekend.

All the best!


1 Like

Hero! That fixed it. Thanks! :smiley:

Oh btw to answer your questions, no redis and no php-fpm. Will look into that now.

1 Like

Perfect Dennis! Congratulations on that fix.

Glad I could help.

Have a nice weekend.