Nextcloud instance not reachable via web

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, 20.0.5): 22.1.1.2
Operating system and version (eg, Ubuntu 20.04): YunoHost 4.4.3 (Debian 10.13)
Apache or nginx version (eg, Apache 2.4.25): nginx/1.14.2
PHP version (eg, 7.4): PHP 7.3.31-1~deb10u2

The issue you are facing:

Hello, I am a newbie here trying to maintain his own server. Its storage ( installed on a raspberry pi 3 B+) was reaching full capacity and I tried to empty the trash bin following instructions from here:
Trash bin: AbstractTrash::getSize() must be of the type integer, float returned · Issue #13160 · nextcloud/server · GitHub and here Can't access to the trashbin - #16 by Johannes_Kattnig

After following them I was able to see the trash bin in the nextcloud website, which I couldn’t at the beginning. However I couldn’t delete files there. I tried the command specified in those links: sudo -u www-data php occ trashbin:cleanup --all-users however there was an error message saying the web server had no permissions to write on config. So I dug more and found other links that suggested to run this to give permissions to the web server:
chown -R www-data:www-data /var/www/owncloud/config

I changed owncloud for nextcloud and run it. Then I run again sudo -u www-data php occ trashbin:cleanup --all-users and since then when I tried to reach mydomain/nextcloud it was giving error. I found in the config folder a new file called config.save.php that was not there and I don’t know why on earth I decided to delete it (don’t be to hars, I am still learning, probably there was the main mistake). Since then when I try to reach mydomain/nextcloud there is a white background and the message File not found. I cannot reach it via web and all my devices connected cannot either. I can access the server via ssh or its own yunohost web interface though.

Thank you in advance for your help and your attention, it is highly appreciated.

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

Steps to replicate it:

  1. chown -R www-data:www-data /var/www/owncloud/config
  2. sudo -u www-data php occ trashbin:cleanup --all-users
  3. rm config.save.php

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

<?php
$CONFIG = array (
  'passwordsalt' => 'XXXX',
  'secret' => 'XXXX',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'mydomain/nextcloud',
  ),
  'datadirectory' => 'nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '22.2.10.2',
  'overwrite.cli.url' => 'https://mydomain/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'instanceid' => 'xxx',
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'updatechecker' => false,
  'memcache.local' => '\\OC\\Memcache\\APCu',
    'integrity.check.disabled' => true,
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'hashing_default_password' => true,
  'localstorage.allowsymlinks' => true,
  'logout_url' => 'https://mydomain/yunohost/sso/?action=logout',
   'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' =>
  array (
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
  ),
  'maintenance' => false,
  'loglevel' => 2,
  'simpleSignUpLink.shown' => false,
  'config_is_read_only' => false,
);


The output of your Apache/nginx/system log in /var/log/nginx/mydomain-error.log:

2023/01/19 15:34:38 [error] 1128#1128: *4853 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: XXX, server: mydomain, request: "GET /nextcloud/status.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm-nextcloud.sock:", host: "mydomain"
2023/01/19 15:34:38 [error] 1128#1128: *4853 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: xxx, server: mydomain, request: "GET /nextcloud/nextcloud/status.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm-nextcloud.sock:", host: "mydomain"
2023/01/19 15:35:40 [error] 1128#1128: *4856 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: xxx, server: mydomain, request: "GET /nextcloud/status.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm-nextcloud.sock:", host: "mydomain"
2023/01/19 15:35:40 [error] 1128#1128: *4856 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: xxx, server: mydomain, request: "GET /nextcloud/nextcloud/status.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm-nextcloud.sock:", host: "mydomain"
2023/01/19 15:36:42 [error] 1128#1128: *4859 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: xxx, server: mydomain, request: "GET /nextcloud/status.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm-nextcloud.sock:", host: "mydomain"
2023/01/19 15:36:42 [error] 1128#1128: *4859 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: xxx, server: mydomain, request: "GET /nextcloud/nextcloud/status.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm-nextcloud.sock:", host: "mydomain"
2023/01/19 15:37:44 [error] 1128#1128: *4863 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: xxx, server: mydomain, request: "GET /nextcloud/status.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm-nextcloud.sock:", host: "mydomain"
2023/01/19 15:37:44 [error] 1128#1128: *4863 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: xxx, server: mydomain, request: "GET /nextcloud/nextcloud/status.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm-nextcloud.sock:", host: "mydomain"
2023/01/19 15:38:45 [error] 1128#1128: *4866 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: xxx, server: mydomain, request: "GET /nextcloud/status.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm-nextcloud.sock:", host: "mydomain"
2023/01/19 15:38:45 [error] 1128#1128: *4866 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: xxx, server: mydomain, request: "GET /nextcloud/nextcloud/status.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm-nextcloud.sock:", host: "mydomain"


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

/var/www/nextcloud/ has no nextcloud.log, is empty.

hello @segu88 welcome t the forum :handshake:

your recovery steps sound like result of deeper research

but at the same time like try&error approach

I have the feeling you are not a “newbie” (at least not in computer tech as you are familiar with Github and cli)… but I’m wondering you start a complex software project like Nextcloud on ancient software versions (NC22, PHP 7.3, Debian 10)…

I think you need to describe your system with more details. If you start now I would recommend throw away all the old mess and start from scratch with current software.

For easy start take a look at something “complete” like Nextcloud AiO oder NextcloudPi - this is not only for Pi :wink:

Hello @wwe, thank you for your welcome and for your help. So although I am getting familiar with cli, github and computer tech in general, I am really new in this world. My background is very different. Just found I like it and wanted to have my own server. That is probably the reason of my mess :sweat_smile:. I started this project in 2021 around september, that might account for the ancient software version maybe? I decided to go with yunohost project because I found it easier for me at that time (maybe still at this time) because not all the setup is done through cli. And although I have been updating it regularly, I haven’t migrate to Debian 11 as at the time that upgrade was available, there was a message from developers saying they need to test it a bit more on yunohost, so I waited a bit…

All that said, although I had the server for more than a year is only for personal use and I have copies of everything. Do you thing is still worthy trying to solve it? or as you suggested starting from scratch might be a better idea?

Thank you again for your help, appreciate it.

Nextcloud is about privacy :fireworks:

I’m sorry I’m not familiar with yunohost and absolutely can’t judge about pro/contra. I’m running my Nextcloud since 2021 with Docker on 3 different hardware`s now and I’m happy. If you only store files local file copies should be OK, if you use more like contacts, shares, metadata your should consider good backup and restore