500 internal server error trying to access nextcloud

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, 12.0.2): 16.0.3
Operating system and version (eg, Ubuntu 17.04): 18.04 Server LTS
Apache or nginx version (eg, Apache 2.4.25): nginx 1.14.0
PHP version (eg, 7.1): 7.2

The issue you are facing: Every time I try to access Nextcloud, either via browser (Firefox) or the Nextcloud client, I get a 500 internal server error.

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

Steps to replicate it: Enter https://ip_address/nextcloud/ in the browser’s address bar.

The output of your Nextcloud log in Admin > Logging:

nextcloud.log is empty

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

<?php
$CONFIG = array (
  'instanceid' => 'oc1r82rd62yk',
  'passwordsalt' => 'eGIJMz+8jWr3jCQ5WzhRc+fIqjEhhX',
  'secret' => 'cbOLmppG2kAwLZm5HCRcD97984GNx1LWjJjNSZN9lUtq2slh',
  'trusted_domains' => 
  array (
    0 => '192.168.1.101',
    1 => '[REDACTED]/v.com',
  ),
  'datadirectory' => '/opt/nextcloud',
  'dbtype' => 'mysql',
  'version' => '16.0.3.0',
  'overwrite.cli.url' => 'https://192.168.1.101/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '5432',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextclouduser',
  'dbpassword' => 'DaddyWarlock',
  'installed' => true,
);

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

192.168.1.133 - - [17/Aug/2019:15:20:27 -0400] "GET /nextcloud HTTP/2.0" 500 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
192.168.1.133 - - [17/Aug/2019:15:20:27 -0400] "GET /favicon.ico HTTP/2.0" 500 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
192.168.1.133 - - [17/Aug/2019:15:36:20 -0400] "GET /status.php HTTP/2.0" 500 0 "-" "Mozilla/5.0 (Linux) mirall/2.5.1git (Nextcloud)"
192.168.1.133 - - [17/Aug/2019:15:36:20 -0400] "GET / HTTP/2.0" 500 289 "-" "Mozilla/5.0 (Linux) mirall/2.5.1git (Nextcloud)"
192.168.1.133 - - [17/Aug/2019:15:36:20 -0400] "GET /status.php HTTP/2.0" 500 0 "-" "Mozilla/5.0 (Linux) mirall/2.5.1git (Nextcloud)"
192.168.1.133 - - [17/Aug/2019:15:36:43 -0400] "GET /status.php HTTP/1.1" 404 162 "-" "Mozilla/5.0 (Linux) mirall/2.5.1git (Nextcloud)"
192.168.1.133 - - [17/Aug/2019:15:36:43 -0400] "GET /nextcloud/status.php HTTP/1.1" 500 5 "-" "Mozilla/5.0 (Linux) mirall/2.5.1git (Nextcloud)"
192.168.1.133 - - [17/Aug/2019:15:36:43 -0400] "GET / HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Linux) mirall/2.5.1git (Nextcloud)"
192.168.1.133 - - [17/Aug/2019:15:36:43 -0400] "GET /status.php HTTP/1.1" 404 162 "-" "Mozilla/5.0 (Linux) mirall/2.5.1git (Nextcloud)"
192.168.1.133 - - [17/Aug/2019:15:36:43 -0400] "GET /nextcloud/status.php HTTP/1.1" 500 5 "-" "Mozilla/5.0 (Linux) mirall/2.5.1git (Nextcloud)"
192.168.1.133 - - [18/Aug/2019:00:17:19 -0400] "GET /nextcloud/index.php/apps/files/list.php HTTP/2.0" 500 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
192.168.1.133 - - [18/Aug/2019:01:52:50 -0400] "GET /nextcloud/index.php/apps/files/list.php HTTP/2.0" 500 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
192.168.1.133 - - [18/Aug/2019:02:12:22 -0400] "GET /nextcloud/index.php/apps/files/list.php HTTP/2.0" 500 289 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"

Your access.log only says that it triggered a 500 error, you need to check the error log. If it is empty, try to increase the log level so you get all messages.

I had the same issue and It was caused by wrong ownership at redis log file.
chown redis:redis /var/log/redis/redis-server.log
service redis-server restart
After ours of digging that two commands fixed for me.

1 Like

Let’s close this. Internal server errors are quite unspecific without further information. Please open a new topic if you have such an error.

1 Like