Internal Server error No error code

Internal Server error. No error code

Nextcloud version (eg, 20.0.5): Latest
Operating system and version (eg, Ubuntu 20.04) : Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25) : Apache 2.4.41
PHP version (eg, 7.4) : idk

The issue you are facing:

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

Steps to replicate it:

  1. Restart of VServer
  2. Restart of Apache2
  3. Restart of Nginx

The output of your Nextcloud log in Admin > Logging:

CANT LOGIN

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

<?php
$CONFIG = array (
  'instanceid' => 'BLURRED',
  'passwordsalt' => 'BLURRED',
  'secret' => 'BLURRED',
  'trusted_domains' => 
  array (
    0 => 'DOMAIN',
  ),
  'datadirectory' => '/home/Nextcloud/data/',
  'dbtype' => 'mysql',
  'version' => '21.0.1.1',
  'overwrite.cli.url' => 'DOMAIN',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'db_name',
  'dbpassword' => 'password',
  'installed' => true,
  'app_install_overwrite' => 
  array (
    0 => 'admin_notifications',
    1 => 'terms_of_service',
    2 => 'twofactor_gateway',
  ),
  'mail_from_address' => 'username',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'gmail.com',
  'mail_smtpsecure' => 'ssl',
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'username',
  'mail_smtppassword' => 'PASSWORD',
  'mail_smtpauthtype' => 'LOGIN',
);

(I replaced some things with “username” , “password”, “db_name” , “DOMAIN” and “BLURRED”)

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

IDK WHAT YOU MEANT BY "NGINX LOG" SO HERE IS THE APACHE2 ERROR LOG

[Wed Apr 14 00:00:01.026037 2021] [mpm_event:notice] [pid 2759847:tid 140277982616640] AH00489: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Wed Apr 14 00:00:01.026105 2021] [core:notice] [pid 2759847:tid 140277982616640] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 14 03:59:22.396140 2021] [mpm_event:notice] [pid 2759847:tid 140277982616640] AH00491: caught SIGTERM, shutting down
[Wed Apr 14 04:01:49.375137 2021] [mpm_event:notice] [pid 2341454:tid 140445870476352] AH00489: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Wed Apr 14 04:01:49.375349 2021] [core:notice] [pid 2341454:tid 140445870476352] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 14 07:32:56.383071 2021] [mpm_event:notice] [pid 2341454:tid 140445870476352] AH00491: caught SIGTERM, shutting down
[Wed Apr 14 07:32:56.463376 2021] [mpm_event:notice] [pid 2438431:tid 140306007346240] AH00489: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Wed Apr 14 07:32:56.463550 2021] [core:notice] [pid 2438431:tid 140306007346240] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 14 07:39:14.380442 2021] [mpm_event:notice] [pid 2438431:tid 140306007346240] AH00491: caught SIGTERM, shutting down
[Wed Apr 14 07:39:14.466603 2021] [mpm_event:notice] [pid 2440729:tid 140002667215936] AH00489: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Wed Apr 14 07:39:14.466817 2021] [core:notice] [pid 2440729:tid 140002667215936] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 14 07:41:28.837163 2021] [mpm_event:notice] [pid 2440729:tid 140002667215936] AH00491: caught SIGTERM, shutting down
[Wed Apr 14 07:41:28.933033 2021] [mpm_event:notice] [pid 2441594:tid 139709776088128] AH00489: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Wed Apr 14 07:41:28.933231 2021] [core:notice] [pid 2441594:tid 139709776088128] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 14 07:49:10.420609 2021] [mpm_event:notice] [pid 2441594:tid 139709776088128] AH00491: caught SIGTERM, shutting down
[Wed Apr 14 07:49:10.539544 2021] [mpm_event:notice] [pid 2444221:tid 139761239776320] AH00489: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Wed Apr 14 07:49:10.539781 2021] [core:notice] [pid 2444221:tid 139761239776320] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 14 21:54:13.165033 2021] [mpm_event:notice] [pid 2444221:tid 139761239776320] AH00491: caught SIGTERM, shutting down
[Wed Apr 14 21:54:13.354494 2021] [mpm_event:notice] [pid 2711764:tid 140035827162176] AH00489: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Wed Apr 14 21:54:13.354758 2021] [core:notice] [pid 2711764:tid 140035827162176] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 14 21:56:11.771782 2021] [access_compat:error] [pid 2711766:tid 140035428955904] [client 172.18.0.3:46618] AH01797: client denied by server configuration: /var/www/nextcloud/data/
[Wed Apr 14 22:00:56.589379 2021] [mpm_event:notice] [pid 2711764:tid 140035827162176] AH00491: caught SIGTERM, shutting down
[Wed Apr 14 22:00:56.666115 2021] [mpm_event:notice] [pid 2714101:tid 140528185642048] AH00489: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Wed Apr 14 22:00:56.666254 2021] [core:notice] [pid 2714101:tid 140528185642048] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 14 22:09:56.165460 2021] [mpm_event:notice] [pid 2714101:tid 140528185642048] AH00491: caught SIGTERM, shutting down
[Wed Apr 14 22:10:31.199941 2021] [mpm_event:notice] [pid 476:tid 140512533081152] AH00489: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Wed Apr 14 22:10:31.200428 2021] [core:notice] [pid 476:tid 140512533081152] AH00094: Command line: '/usr/sbin/apache2'

Also: it worked since yesterday and now I woke up and it did not anymore

Hi,

This is a Nextcloud error message - could you provide the Nextcloud log files? You should also be able to locate the corresponding error in the file using the reference from your screenshot.

/S

Sure! Idk if this is the right file but heres the “nextcloud.log” file located in ROOT/data/nextcloud.log

{"reqId":"OldJLRTx2NwUcB2qqFDE","level":2,"time":"2021-04-14T05:41:33+00:00","remoteAddr":"95.91.243.31","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36","version":""}
{"reqId":"OldJLRTx2NwUcB2qqFDE","level":2,"time":"2021-04-14T05:41:33+00:00","remoteAddr":"95.91.243.31","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36","version":""}
{"reqId":"PhY2q7Y0qkwl2V0MMPrj","level":2,"time":"2021-04-14T05:41:35+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36","version":""}
{"reqId":"PhY2q7Y0qkwl2V0MMPrj","level":2,"time":"2021-04-14T05:41:35+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36","version":""}
{"reqId":"APnYkOY2rMBSbyTkrxux","level":2,"time":"2021-04-14T05:42:34+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36","version":""}
{"reqId":"APnYkOY2rMBSbyTkrxux","level":2,"time":"2021-04-14T05:42:34+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36","version":""}
{"reqId":"5tTG6vykNmcHYLHdi4fR","level":2,"time":"2021-04-14T05:42:34+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36","version":""}
{"reqId":"5tTG6vykNmcHYLHdi4fR","level":2,"time":"2021-04-14T05:42:34+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36","version":""}
{"reqId":"MVyOEgiA7G5TH3NrJRQq","level":2,"time":"2021-04-14T05:42:34+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36","version":""}
{"reqId":"MVyOEgiA7G5TH3NrJRQq","level":2,"time":"2021-04-14T05:42:34+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36","version":""}
{"reqId":"HuBVYOS1QiroBLzJhut0","level":2,"time":"2021-04-14T05:42:40+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36","version":""}
{"reqId":"HuBVYOS1QiroBLzJhut0","level":2,"time":"2021-04-14T05:42:40+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36","version":""}
{"reqId":"RP5cf9vzBxQy4NMeup90","level":2,"time":"2021-04-14T05:43:11+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":""}
{"reqId":"RP5cf9vzBxQy4NMeup90","level":2,"time":"2021-04-14T05:43:11+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":""}
{"reqId":"5AOjwoXeYwpwIFxvMkS2","level":2,"time":"2021-04-14T05:43:11+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36","version":""}
{"reqId":"5AOjwoXeYwpwIFxvMkS2","level":2,"time":"2021-04-14T05:43:11+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36","version":""}
{"reqId":"6bEe0vfrDLVJeB5k0bKO","level":2,"time":"2021-04-14T05:43:18+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":""}
{"reqId":"6bEe0vfrDLVJeB5k0bKO","level":2,"time":"2021-04-14T05:43:18+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":""}
{"reqId":"EZfePWmSp8HqkQwPodLP","level":2,"time":"2021-04-14T05:43:45+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","version":""}
{"reqId":"EZfePWmSp8HqkQwPodLP","level":2,"time":"2021-04-14T05:43:45+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","version":""}
{"reqId":"Uurl2KLn1e9qKNQl2xVQ","level":2,"time":"2021-04-14T05:43:45+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","version":""}
{"reqId":"Uurl2KLn1e9qKNQl2xVQ","level":2,"time":"2021-04-14T05:43:45+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","version":""}
{"reqId":"KMJEIQAiWw0U2zr7BGhA","level":2,"time":"2021-04-14T05:43:48+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/64.0","version":""}
{"reqId":"KMJEIQAiWw0U2zr7BGhA","level":2,"time":"2021-04-14T05:43:48+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/64.0","version":""}
{"reqId":"NmGQbMsmDbNXKr2SsRKa","level":2,"time":"2021-04-14T05:43:49+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/64.0","version":""}
{"reqId":"NmGQbMsmDbNXKr2SsRKa","level":2,"time":"2021-04-14T05:43:49+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/64.0","version":""}
{"reqId":"DnaGLWf0WvBq0kS2TXYI","level":2,"time":"2021-04-14T05:43:52+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1","version":""}
{"reqId":"DnaGLWf0WvBq0kS2TXYI","level":2,"time":"2021-04-14T05:43:52+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1","version":""}
{"reqId":"UWTJctsYtKTTFolx63tB","level":2,"time":"2021-04-14T05:44:10+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36","version":""}
{"reqId":"UWTJctsYtKTTFolx63tB","level":2,"time":"2021-04-14T05:44:10+00:00","remoteAddr":"172.18.0.3","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36","version":""}

@Immuc it seems there is an issue inside your .htaccess

sudo -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess

Shows this:

root@vmd68923:~# sudo -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess

An unhandled exception has been thrown:
    Error: Call to undefined method GuzzleHttp\Utils::chooseHandler() in /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/functions.php:61
    Stack trace:
    #0 /var/www/nextcloud/apps/twofactor_gateway/vendor/guzzlehttp/guzzle/src/HandlerStack.php(42): GuzzleHttp\choose_handler()
    #1 /var/www/nextcloud/apps/twofactor_gateway/vendor/guzzlehttp/guzzle/src/Client.php(66): GuzzleHttp\HandlerStack::create()
    #2 /var/www/nextcloud/lib/private/Http/Client/ClientService.php(62): GuzzleHttp\Client->__construct()
    #3 /var/www/nextcloud/lib/private/OCS/DiscoveryService.php(55): OC\Http\Client\ClientService->newClient()
    #4 /var/www/nextcloud/lib/private/Server.php(1264): OC\OCS\DiscoveryService->__construct()
    #5 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}()
    #6 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
    #7 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
    #8 /var/www/nextcloud/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query()
    #9 /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(434): OC\ServerContainer->query()
    #10 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(87): OC\AppFramework\DependencyInjection\DIContainer->query()
    #11 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
    #12 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(101): array_map()
    #13 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(109): OC\AppFramework\Utility\SimpleContainer->buildClass()
    #14 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(126): OC\AppFramework\Utility\SimpleContainer->resolve()
    #15 /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(459): OC\AppFramework\Utility\SimpleContainer->query()
    #16 /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(431): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback()
    #17 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(87): OC\AppFramework\DependencyInjection\DIContainer->query()
    #18 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
    #19 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(101): array_map()
    #20 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(109): OC\AppFramework\Utility\SimpleContainer->buildClass()
    #21 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(126): OC\AppFramework\Utility\SimpleContainer->resolve()
    #22 /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(459): OC\AppFramework\Utility\SimpleContainer->query()
    #23 /var/www/nextcloud/lib/private/ServerContainer.php(146): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback()
    #24 /var/www/nextcloud/lib/private/Console/Application.php(221): OC\ServerContainer->query()
    #25 /var/www/nextcloud/lib/private/Console/Application.php(136): OC\Console\Application->loadCommandsFromInfoXml()
    #26 /var/www/nextcloud/console.php(99): OC\Console\Application->loadCommands()
    #27 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')

Hello @Immuc how are you doing?

So, before anything 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!

:smiley:

2 Likes

Ok so I installed php-fpm, ran all commands but still same/I think the same error. Shows same error on the page

And the thing is, that it worked from some days ago(when I set it up) since yesterday…

PHP version is 7.4.3

HI @Immuc?
can you send your .htaccess file ?? (hide private information )
Can you send the config of your reverse proxy?

This is the haccess file:

# Section for Apache 2.4 to 2.6
<IfModule mod_authz_core.c>
  Require all denied
</IfModule>
<IfModule mod_access_compat.c>
  Order Allow,Deny
  Deny from all
  Satisfy All
</IfModule>

# Section for Apache 2.2
<IfModule !mod_authz_core.c>
  <IfModule !mod_access_compat.c>
    <IfModule mod_authz_host.c>
      Order Allow,Deny
      Deny from all
    </IfModule>
    Satisfy All
  </IfModule>
</IfModule>

# Section for Apache 2.2 to 2.6
<IfModule mod_autoindex.c>
  IndexIgnore *
</IfModule>

And idk but I dont think the reverse proxy config is relevant cause it worked and I didnt changed anything in there…

@Immuc I have nothing similar to you for the .htaccess files…

Maybe fix this error can help you but I don’t know why is it appear…

Mh okay so 1. it is cause of something in /vat/www/nextcloud/data/ ?
and 2. its not cause of my htaccess file?

cause when I think about it… I changed something in the config.php, thats in this directory.
could you send me your config.php? ofcourse blurred ip etc

@Immuc I don’t know exactly but something is prevented access to the folder.

Here is my config.php

$CONFIG = array (
‘instanceid’ => ‘XXXXXXXXX’,
‘passwordsalt’ => ‘XXXXXXXXXXXXXX’,
‘secret’ => ‘XXXXXXXXXX’,
‘trusted_domains’ =>
array (
0 => ‘XXXXXXXX’,
1 => 'XXXXXXX,
2 => ‘127.0.0.1’,
),
‘datadirectory’ => ‘/nextcloud/data’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘21.0.1.1’,
‘overwrite.cli.url’ => ‘https://XXXXXXX/’,
‘dbname’ => ‘XXXXXX’,
‘dbhost’ => ‘localhost’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘mysql.utf8mb4’ => true,
‘dbuser’ => ‘XXXXXX’,
‘dbpassword’ => ‘XXXXXX’,
‘installed’ => true,
‘htaccess.RewriteBase’ => ‘/’,
‘allow_local_remote_servers’ => true,
‘mail_from_address’ => ‘XXXXXX’,
‘mail_smtpmode’ => ‘smtp’,
‘mail_sendmailmode’ => ‘smtp’,
‘mail_domain’ => ‘gmail.com’,
‘mail_smtpauthtype’ => ‘LOGIN’,
‘mail_smtpauth’ => 1,
‘mail_smtphost’ => ‘smtp.gmail.com’,
‘mail_smtpport’ => ‘465’,
‘mail_smtpsecure’ => ‘ssl’,
‘mail_smtpname’ => ‘XXXXXXXXX’,
‘mail_smtppassword’ => ‘XXXXXXX’,
‘loglevel’ => 2,
‘memcache.local’ => ‘\OC\Memcache\Redis’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘memcache.distributed’ => ‘\OC\Memcache\Redis’,
‘filelocking.enabled’ => ‘true’,
‘redis’ =>
array (
‘host’ => ‘localhost’,
‘port’ => 6379,
),
‘logtimezone’ => ‘Europe/Paris’,
‘preview_max_filesize_image’ => 100,
‘default_language’ => ‘fr’,
‘default_locale’ => ‘fr_FR’,
‘simpleSignUpLink.shown’ => false,
‘app_install_overwrite’ =>
array (
0 => ‘passman’,
1 => ‘apporder’,
2 => ‘bruteforcesettings’,
3 => ‘side_menu’,
4 => ‘onlyoffice’,
5 => ‘unsplash’,
6 => ‘socialsharing_email’,
7 => ‘talk_simple_poll’,
8 => ‘music’,
9 => ‘metadata’,
10 => ‘drawio’,
11 => ‘flowupload’,
12 => ‘groupfolders’,
13 => ‘ransomware_protection’,
),
‘maintenance’ => false,
‘updater.release.channel’ => ‘stable’,
‘theme’ => ‘’,
‘default_phone_region’ => ‘ISO 3166-2:FR’,
‘trusted_proxies’ =>
array (
0 => ‘127.0.0.1’,
1 => ‘::1’,
),
);

Can u also send me ur htaccess file?