NextcloudPi - Error 404 forbidden

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, 18.0.2): 19.0.4.2
Operating system and version (eg, Ubuntu 20.04): Raspberry Pi OS (arm64-2020-08-24)
Apache or nginx version (eg, Apache 2.4.25): 2.4.38
PHP version (eg, 7.1): 7.3.19-1

The issue you are facing: Something on my Nextcloudpi server crashes regularly. When I then try to access my cloud using the web address or ip address, I get the error message 403 Forbidden. In this case the Raspberry is not reachable via SSH anymore. As soon as I disconnect the Raspberry from the power and restart it, everything works fine again. The error occurs at least once a day and I can neither reproduce it manually nor can I see if there is a connection to any action. I’ve already searched the forum here, but I couldn’t find an entry with the 403 error, which disappears after a restart. I would be happy to provide more logging information if needed. I would be so happy if somebody got a solution for my problem. I’m so damn close to my perfect Nextcloud. Greetings!

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

The output of your Nextcloud log in Admin > Logging:

It seems that there is no coherent error message here.

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',
    11 => 'xxx',
    1 => 'xxx',
    5 => 'nextcloudpi.local',
    7 => 'nextcloudpi',
    8 => 'nextcloudpi.lan',
    12 => 'xxx',
    20 => 'xxx',
    21 => 'xxx',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '19.0.4.2',
  'overwrite.cli.url' => 'https://xxx/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'ncadmin',
  'dbpassword' => 'xxx',
  'installed' => true,
  'instanceid' => 'ocmiyxhkmi2l',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => 'xxx',
  ),
  'tempdirectory' => '/var/www/nextcloud/data/tmp',
  'mail_smtpmode' => 'sendmail',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'admin',
  'mail_domain' => 'ownyourbits.com',
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'overwriteprotocol' => 'https',
  'loglevel' => '2',
  'log_type' => 'file',
  'htaccess.RewriteBase' => '/',
);

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

Apache error.log:

Tue Nov 10 00:00:03.132016 2020] [ssl:warn] [pid 662:tid 548328539504] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 00:00:03.135298 2020] [mpm_event:notice] [pid 662:tid 548328539504] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Nov 10 00:00:03.135346 2020] [core:notice] [pid 662:tid 548328539504] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 10 01:50:02.406038 2020] [mpm_event:notice] [pid 662:tid 548328539504] AH00491: caught SIGTERM, shutting down
[Tue Nov 10 01:50:10.061603 2020] [ssl:warn] [pid 507:tid 548418594160] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 01:50:10.189695 2020] [ssl:warn] [pid 580:tid 548418594160] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 01:50:10.222595 2020] [mpm_event:notice] [pid 580:tid 548418594160] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Nov 10 01:50:10.222734 2020] [core:notice] [pid 580:tid 548418594160] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 10 07:00:02.716887 2020] [mpm_event:notice] [pid 580:tid 548418594160] AH00491: caught SIGTERM, shutting down
[Tue Nov 10 07:00:10.210685 2020] [ssl:warn] [pid 506:tid 547845899632] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 07:00:10.316974 2020] [ssl:warn] [pid 637:tid 547845899632] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 07:00:10.325107 2020] [mpm_event:notice] [pid 637:tid 547845899632] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Nov 10 07:00:10.325208 2020] [core:notice] [pid 637:tid 547845899632] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 10 13:36:29.019482 2020] [mpm_event:notice] [pid 637:tid 547845899632] AH00491: caught SIGTERM, shutting down
[Tue Nov 10 13:36:37.113203 2020] [ssl:warn] [pid 493:tid 548594828656] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 13:36:37.231155 2020] [ssl:warn] [pid 640:tid 548594828656] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 13:36:37.257988 2020] [mpm_event:notice] [pid 640:tid 548594828656] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Nov 10 13:36:37.258109 2020] [core:notice] [pid 640:tid 548594828656] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 10 13:39:51.118445 2020] [mpm_event:notice] [pid 640:tid 548594828656] AH00491: caught SIGTERM, shutting down
[Tue Nov 10 13:39:59.249715 2020] [ssl:warn] [pid 500:tid 548277146992] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 13:39:59.343567 2020] [ssl:warn] [pid 648:tid 548277146992] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 13:39:59.361666 2020] [mpm_event:notice] [pid 648:tid 548277146992] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Nov 10 13:39:59.361857 2020] [core:notice] [pid 648:tid 548277146992] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 10 13:59:43.667858 2020] [mpm_event:notice] [pid 648:tid 548277146992] AH00491: caught SIGTERM, shutting down
[Tue Nov 10 13:59:51.928870 2020] [ssl:warn] [pid 490:tid 548194051440] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 13:59:52.027575 2020] [ssl:warn] [pid 587:tid 548194051440] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 13:59:52.036991 2020] [mpm_event:notice] [pid 587:tid 548194051440] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Nov 10 13:59:52.037190 2020] [core:notice] [pid 587:tid 548194051440] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 10 14:07:08.171476 2020] [mpm_event:notice] [pid 587:tid 548194051440] AH00491: caught SIGTERM, shutting down
[Tue Nov 10 14:07:15.949603 2020] [ssl:warn] [pid 473:tid 547874952560] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 14:07:16.084324 2020] [ssl:warn] [pid 576:tid 547874952560] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 14:07:16.110147 2020] [mpm_event:notice] [pid 576:tid 547874952560] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Nov 10 14:07:16.130182 2020] [core:notice] [pid 576:tid 547874952560] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 10 14:17:32.225148 2020] [mpm_event:notice] [pid 576:tid 547874952560] AH00491: caught SIGTERM, shutting down
[Tue Nov 10 14:17:40.184557 2020] [ssl:warn] [pid 498:tid 547875915120] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 14:17:40.255438 2020] [ssl:warn] [pid 623:tid 547875915120] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 14:17:40.264894 2020] [mpm_event:notice] [pid 623:tid 547875915120] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Nov 10 14:17:40.265023 2020] [core:notice] [pid 623:tid 547875915120] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 10 14:28:55.034981 2020] [mpm_event:notice] [pid 623:tid 547875915120] AH00491: caught SIGTERM, shutting down
[Tue Nov 10 14:33:30.560629 2020] [ssl:warn] [pid 494:tid 547901625712] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 14:33:30.593792 2020] [ssl:warn] [pid 639:tid 547901625712] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 14:33:30.597920 2020] [mpm_event:notice] [pid 639:tid 547901625712] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Nov 10 14:33:30.598013 2020] [core:notice] [pid 639:tid 547901625712] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 10 14:45:33.832263 2020] [mpm_event:notice] [pid 639:tid 547901625712] AH00491: caught SIGTERM, shutting down
[Tue Nov 10 14:45:40.719197 2020] [ssl:warn] [pid 494:tid 548123293040] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 14:45:40.752889 2020] [ssl:warn] [pid 626:tid 548123293040] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 14:45:40.756896 2020] [mpm_event:notice] [pid 626:tid 548123293040] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Nov 10 14:45:40.756989 2020] [core:notice] [pid 626:tid 548123293040] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 10 14:53:46.056775 2020] [mpm_event:notice] [pid 626:tid 548123293040] AH00491: caught SIGTERM, shutting down
[Tue Nov 10 19:27:12.248549 2020] [ssl:warn] [pid 481:tid 547603711344] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 19:27:12.310471 2020] [ssl:warn] [pid 640:tid 547603711344] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 19:27:12.314557 2020] [mpm_event:notice] [pid 640:tid 547603711344] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Nov 10 19:27:12.314638 2020] [core:notice] [pid 640:tid 547603711344] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 10 20:42:39.979031 2020] [proxy_fcgi:error] [pid 647:tid 547527303568] [client 192.168.178.2:54461] AH01067: Failed to read FastCGI header
[Tue Nov 10 20:42:39.979117 2020] [proxy_fcgi:error] [pid 647:tid 547527303568] (104)Connection reset by peer: [client 192.168.178.2:54461] AH01075: Error dispatching request to :4443:
[Tue Nov 10 20:42:40.251575 2020] [mpm_event:notice] [pid 640:tid 547603711344] AH00491: caught SIGTERM, shutting down
[Tue Nov 10 20:42:47.615184 2020] [ssl:warn] [pid 495:tid 548377900400] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 10 20:42:47.659172 2020] [ssl:warn] [pid 644:tid 548377900400] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name

Apache nc-error.log:

Tue Nov 10 10:46:33.568027 2020] [access_compat:error] [pid 643:tid 546953990544] [client 95.116.126.96:49782] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Tue Nov 10 10:47:37.193847 2020] [access_compat:error] [pid 643:tid 547356643728] [client 37.120.217.212:36740] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Tue Nov 10 13:40:11.609592 2020] [access_compat:error] [pid 663:tid 547566363024] [client 95.116.126.96:58293] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Tue Nov 10 19:27:38.469916 2020] [access_compat:error] [pid 648:tid 547062997392] [client 152.89.163.140:57032] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Tue Nov 10 20:42:55.089588 2020] [proxy:error] [pid 654:tid 548041195920] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Tue Nov 10 20:42:55.089676 2020] [proxy_fcgi:error] [pid 654:tid 548041195920] [client 152.89.163.140:62402] AH01079: failed to make connection to backend: httpd-UDS
[Tue Nov 10 20:43:11.698392 2020] [proxy:error] [pid 655:tid 547943870864] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Tue Nov 10 20:43:11.698518 2020] [proxy_fcgi:error] [pid 655:tid 547943870864] [client 152.89.163.140:63838] AH01079: failed to make connection to backend: httpd-UDS
[Tue Nov 10 20:43:37.692039 2020] [proxy:error] [pid 655:tid 548041195920] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Tue Nov 10 20:43:37.692125 2020] [proxy_fcgi:error] [pid 655:tid 548041195920] [client 152.89.163.140:64772] AH01079: failed to make connection to backend: httpd-UDS
[Tue Nov 10 20:44:11.700618 2020] [proxy:error] [pid 654:tid 547675435408] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Tue Nov 10 20:44:11.700696 2020] [proxy_fcgi:error] [pid 654:tid 547675435408] [client 152.89.163.140:4220] AH01079: failed to make connection to backend: httpd-UDS
[Tue Nov 10 20:44:15.935844 2020] [proxy:error] [pid 654:tid 547893514640] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Tue Nov 10 20:44:15.935928 2020] [proxy_fcgi:error] [pid 654:tid 547893514640] [client 152.89.163.140:4608] AH01079: failed to make connection to backend: httpd-UDS
[Tue Nov 10 20:44:16.016906 2020] [proxy:error] [pid 654:tid 547574722960] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Tue Nov 10 20:44:16.016990 2020] [proxy_fcgi:error] [pid 654:tid 547574722960] [client 152.89.163.140:4610] AH01079: failed to make connection to backend: httpd-UDS
[Tue Nov 10 20:44:16.102508 2020] [proxy:error] [pid 654:tid 547608293776] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Tue Nov 10 20:44:16.102574 2020] [proxy_fcgi:error] [pid 654:tid 547608293776] [client 152.89.163.140:4616] AH01079: failed to make connection to backend: httpd-UDS
[Tue Nov 10 20:44:23.822699 2020] [proxy:error] [pid 654:tid 547616686480] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Tue Nov 10 20:44:23.822773 2020] [proxy_fcgi:error] [pid 654:tid 547616686480] [client 152.89.163.140:5322] AH01079: failed to make connection to backend: httpd-UDS
[Tue Nov 10 20:44:31.061086 2020] [proxy:error] [pid 654:tid 547625079184] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Tue Nov 10 20:44:31.061160 2020] [proxy_fcgi:error] [pid 654:tid 547625079184] [client 152.89.163.140:6068] AH01079: failed to make connection to backend: httpd-UDS
[Tue Nov 10 20:44:44.098667 2020] [proxy:error] [pid 654:tid 547658650000] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Tue Nov 10 20:44:44.098758 2020] [proxy_fcgi:error] [pid 654:tid 547658650000] [client 152.89.163.140:7244] AH01079: failed to make connection to backend: httpd-UDS
[Tue Nov 10 20:45:16.051298 2020] [proxy:error] [pid 654:tid 547935478160] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Tue Nov 10 20:45:16.051367 2020] [proxy_fcgi:error] [pid 654:tid 547935478160] [client 152.89.163.140:9936] AH01079: failed to make connection to backend: httpd-UDS
[Tue Nov 10 20:45:39.722302 2020] [proxy:error] [pid 655:tid 548116836752] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Tue Nov 10 20:45:39.722363 2020] [proxy_fcgi:error] [pid 655:tid 548116836752] [client 152.89.163.140:11724] AH01079: failed to make connection to backend: httpd-UDS
[Tue Nov 10 20:45:47.984712 2020] [proxy:error] [pid 654:tid 547910300048] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Tue Nov 10 20:45:47.984778 2020] [proxy_fcgi:error] [pid 654:tid 547910300048] [client 152.89.163.140:12550] AH01079: failed to make connection to backend: httpd-UDS
[Tue Nov 10 20:46:06.888813 2020] [proxy:error] [pid 654:tid 547994161552] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Tue Nov 10 20:46:06.888896 2020] [proxy_fcgi:error] [pid 654:tid 547994161552] [client 152.89.163.140:15148] AH01079: failed to make connection to backend: httpd-UDS
[Tue Nov 10 20:46:18.185982 2020] [proxy:error] [pid 654:tid 548198310288] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Tue Nov 10 20:46:18.186043 2020] [proxy_fcgi:error] [pid 654:tid 548198310288] [client 152.89.163.140:16176] AH01079: failed to make connection to backend: httpd-UDS
[Tue Nov 10 20:46:52.002426 2020] [proxy:error] [pid 654:tid 548027732368] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Tue Nov 10 20:46:52.002470 2020] [proxy_fcgi:error] [pid 654:tid 548027732368] [client 152.89.163.140:17936] AH01079: failed to make connection to backend: httpd-UDS
[Tue Nov 10 20:47:23.950238 2020] [proxy:error] [pid 654:tid 548010946960] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed
[Tue Nov 10 20:47:23.950301 2020] [proxy_fcgi:error] [pid 654:tid 548010946960] [client 152.89.163.140:20348] AH01079: failed to make connection to backend: httpd-UDS
[Tue Nov 10 20:47:56.009554 2020] [access_compat:error] [pid 619:tid 548034441616] [client 152.89.163.140:23736] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Tue Nov 10 20:52:49.909931 2020] [access_compat:error] [pid 619:tid 548244406672] [client 152.89.163.140:43698] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Tue Nov 10 21:06:23.458682 2020] [access_compat:error] [pid 583:tid 546995954064] [client 152.89.163.140:46926] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Tue Nov 10 21:13:57.447166 2020] [proxy_fcgi:error] [pid 582:tid 546735911312] (70008)Partial results are valid but processing is incomplete: [client 152.89.163.140:9944] AH01075: Error dispatching request to : (reading input brigade)
[Tue Nov 10 21:56:29.952493 2020] [access_compat:error] [pid 663:tid 547851583888] [client 95.116.126.96:55716] AH01797: client denied by server configuration: /var/www/nextcloud/config


Sounds like it could be hardware, check or swap sdcard, cables and power source.
Look for errors or clues in output of

sudo cat /var/log/syslog

and

sudo dmesg