Nextcloud 404 not found after upgrading php

Support intro

Nextcloud version (eg, 20.0.5): 17.0.1
Operating system and version (eg, Ubuntu 20.04): FreeBSD jail vai FreeNAS
Apache or nginx version (eg, Apache 2.4.25): nginx 1.16.1
PHP version (eg, 7.4): php 7.4

The issue you are facing:
I have been having problems with my nextcloud server and I haven’t been able to get it back up. I had been regularly updating through the web interface (up to version 17.something) and found that the update button didn’t show up any longer. After googling a bit, I found that it was due to running an outdated version of php (I think it was php7.2 at the time). Without thinking I installed php74 (php 7.4.15) and shortly found that when I attempted to connect to my server I was getting 404 not found. I have since been googling a good deal trying to figure out a solution but I haven’t gotten very far. Any help or direction wpuld be greatly appreciated.

Have been able to reload nginx without issues.
Tried reinstalling php72 but still, no luck.
Installed php74 along with: php74-bcmath-7_1.15 php74-bz2-7.4.15 php74-ctype-7.4.15 php74-curl-7.4.15 php74-dom-7.4.15 php74-exif-7.4.15 php74-fileinfo-7.4.15 php74-filter-7.4.15 php74-gd-7.4.15 php74-gmp-7.4.15 php74-iconv-7.4.15 php74-intl-7.4.15 php74-json-7.4.15 php74-ldap-7.4.15 php74-mbstring-7.4.15 php74-opcache-7.4.15 php74-openssl-7.4.15 php74-pdo-7.4.15 php74-pdo_mysql-7.4.15 php74-pecl-APCu-5.1.19 php74-posix-7.4.15 php74-session-7.4.15 php74-simplexml-7.4.15 php74-xml-7.4.15 php74-xmlreader-7.4.15 php74-xmlwriter-7.4.15 php74-xsl-7.4.15 php74-zip-7.4.15 php74-zlib-7.4.15

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

Steps to replicate it:

  1. pkg install php74
  2. type in url path to nextcloud server in browser
  3. 404 not found

The output of your Nextcloud log in Admin > Logging:


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

$CONFIG = array (
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/usr/local/www/nextcloud/apps',
      'url' => '/apps',
      'writable' => true,
    1 => 
    array (
      'path' => '/usr/local/www/nextcloud/apps-pkg',
      'url' => '/apps-pkg',
      'writable' => true,
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'instanceid' => 'oc8mq4ooxd53',
  'passwordsalt' => 'cuLVMSLvXvz0NbjQzzx1/ZklqBvsoN',
  'secret' => 'nvFEqUezbmj6TysSnc9oXBUkHqmL5BdStjJ2WQp6zI6yvFcs',
  'trusted_domains' => 
  array (
    0 => '192.168.1.XXX',
    1 => '',
  'datadirectory' => '/usr/local/share/nextCloudData',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'http://192.168.1.XXX',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_XXXXXX,
  'dbpassword' => 'XmO0WOGIneVmmhNI08lk4UhqsiXzsi',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'updater.secret' => '$2y$10$.Dzs61ztBnCQi684yYXyEO8e9iV2V5mtQrQuATRIVOFO.GpUxBfvK',
  '' => 'stable',

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


Hello @ignis-fatuus ,

welcome to the community of Nextcloud.

That definitely looks like a webserver setup issue.
Please search the forum.

Have you checked if NC17 is compatible with PHP7.4?

The reason that I wanted to update php to 7.4 was so that I could update nextcloud to version 18 and beyond. The problem now is that even after rolling php back down to 7.2, I still am unable to access nextcloud and am rather lost as to what I can do at this point. I will search the forums some more.

Hello, did you update your Nginx configuration ?
Nginx conf may contain this :

upstream php-handler {
    server unix:/var/run/php/php7.4-fpm.sock;

But maybe, there are other edits.
The simplest way is to backup your current Nginx conf and try an Nginx conf from a recent version of NC : Nginx configuration — Nextcloud latest Administration Manual latest documentation .