Nextcloud login page gone after ubuntu update

Nextcloud version: Nextcloud 20.0.14
Operating system and version: ubuntu 24.04.1 LTS
Apache or nginx version: apache 2.4
PHP version (eg, 8.3): PHP 8.3.6

The issue you are facing:
We just upgraded Ubuntu to 24 from 20. We got a new https cert with certbot. We then tried to copy the config folder, theme folder, data folder, and database to the mounted backup drive. Well in the process I messed up something and now the Nextcloud login page is gone!

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

Steps to replicate it:

  1. my https:// url gives me “Not Found-The requested URL was not found on this server.”
  2. my local ip brings me to the apache ubuntu “IT works page”.
  3. http url is a blank page

The output of your Nextcloud log in Admin > Logging:

no logs listed?

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

<?php
$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' =>
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'log_type' => 'file',
  'logfile' => '/var/snap/nextcloud/current/logs/nextcloud.log',
  'logfilemode' => 416,
  'passwordsalt' => 'Dv9abA3MNKGmXWpih/scTWoipSlw3X',
  'secret' => '/zZzF2LKv7x32A79LWRM9XOABEUgS1KQUWSNQDQPPSW+3Xdt',
  'trusted_domains' =>
  array (
    0 => '192.168.100.112',
    1 => 'https://snstegalmjlnext.ddns.net',
    2 => 'snstegalmjlnext.ddns.net',
    3 => 'localhost',
  ),
  'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '20.0.14.2',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'vmckW_u-tXCi6K89kLa45iCY-GJLpHCprYferhff0V65b_Dq8G1MYkzTbXtj2y1e',
  'installed' => true,
  'instanceid' => 'octqsweo9bir',
  'maintenance' => false,
  'loglevel' => 2,
);

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


[Sun Oct 20 00:00:01.857619 2024] [mpm_prefork:notice] [pid 1313] AH00163: Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 configured -- resuming normal operations
[Sun Oct 20 00:00:01.857664 2024] [core:notice] [pid 1313] AH00094: Command line: '/usr/sbin/apache2'
[Sun Oct 20 00:09:20.431920 2024] [php:error] [pid 283501] [client 192.230.211.66:51304] script '/var/www/nextcloud/index.php' not found or unable to stat
[Sun Oct 20 00:25:00.304315 2024] [php:error] [pid 283500] [client 192.230.211.66:51370] script '/var/www/nextcloud/index.php' not found or unable to stat
[Sun Oct 20 00:44:51.496714 2024] [php:error] [pid 283502] [client 192.230.211.66:51390] script '/var/www/nextcloud/index.php' not found or unable to stat
[Sun Oct 20 00:51:48.884896 2024] [php:error] [pid 283502] [client 192.230.211.66:62301] script '/var/www/nextcloud/index.php' not found or unable to stat
[Sun Oct 20 01:00:34.648045 2024] [php:error] [pid 283499] [client 192.230.211.66:51448] script '/var/www/nextcloud/index.php' not found or unable to stat
[Sun Oct 20 01:16:17.902957 2024] [php:error] [pid 816013] [client 192.230.211.66:51484] script '/var/www/nextcloud/index.php' not found or unable to stat
[Sun Oct 20 01:27:21.875929 2024] [php:error] [pid 283502] [client 192.230.211.66:62771] script '/var/www/nextcloud/index.php' not found or unable to stat
[Sun Oct 20 01:32:00.974501 2024] [php:error] [pid 283501] [client 192.230.211.66:51666] script '/var/www/nextcloud/index.php' not found or unable to stat

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.

none listed

we’ll need to know exactly what happened.

Don’t panic!

[!IMPORTANT]
Relax, take a deep breath, get a cup of tea and consider your options. Recollect steps taken, note recent changes and structure that information. Do the basics and try to get a grasp of the situation.

If you’re having a Nextcloud snap issue and you’ve come this far, then you’re on the right track!

  1. Ensure nothing was missed:
  2. Run the debugging script before raising an issue
  3. Create an issue and complete the bug report (the more information the better)

It was working fine before i tried to use certbot to recieve a new cert. I believe my issue could have stemmed from using “sudo certbot --apache” rather than running certbot in the nextcloud snap. When i did this it issued the cert but httpd was running on port 80 blocking the certbot from completing. Then it was stopped by port 443. I thought well why not open port 77 http, 80 for apache, 443 for https on nextcloud. It seems 8pids were running for apache when i run the grep command to list.

Nextcloud configuration

{
    "system": {
        "apps_paths": [
            {
                "path": "\/snap\/nextcloud\/current\/htdocs\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/snap\/nextcloud\/current\/nextcloud\/extra-apps",
                "url": "\/extra-apps",
                "writable": true
            }
        ],
        "supportedDatabases": [
            "mysql"
        ],
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0
        },
        "log_type": "file",
        "logfile": "\/var\/snap\/nextcloud\/current\/logs\/nextcloud.log",
        "logfilemode": 416,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.100.112",
            "https:\/\/snstegalmjlnext.ddns.net",
            "snstegalmjlnext.ddns.net",
            "localhost"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "20.0.14.2",
        "overwrite.cli.url": "http:\/\/localhost",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "loglevel": 2
    },
    "apps": {
        "accessibility": {
            "enabled": "yes",
            "installed_version": "1.6.0",
            "types": ""
        },
        "activity": {
            "enabled": "yes",
            "installed_version": "2.13.4",
            "types": "filesystem"
        },
        "backgroundjob": {
            "lastjob": "26"
        },
        "cloud_federation_api": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": "filesystem"
        },
        "comments": {
            "enabled": "yes",
            "installed_version": "1.10.0",
            "types": "logging"
        },
        "contactsinteraction": {
            "enabled": "yes",
            "installed_version": "1.1.0",
            "types": "dav"
        },
        "core": {
            "backgroundjobs_mode": "cron",
            "installedat": "1613668264.0822",
            "lastcron": "1729570277",
            "lastupdatedat": "0",
            "moveavatarsdone": "yes",
            "oc.integritycheck.checker": "[]",
            "previewsCleanedUp": "1",
            "public_files": "files_sharing\/public.php",
            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
            "theming.variables": "b92d206521717ac032f8aa58d3c7ff2f",
            "vendor": "nextcloud"
        },
        "dashboard": {
            "enabled": "yes",
            "installed_version": "7.0.0",
            "types": ""
        },
        "dav": {
            "buildCalendarReminderIndex": "yes",
            "buildCalendarSearchIndex": "yes",
            "enabled": "yes",
            "installed_version": "1.16.2",
            "regeneratedBirthdayCalendarsForYearFix": "yes",
            "types": "filesystem"
        },
        "federatedfilesharing": {
            "enabled": "yes",
            "installed_version": "1.10.2",
            "types": ""
        },
        "federation": {
            "enabled": "yes",
            "installed_version": "1.10.1",
            "types": "authentication"
        },
        "files": {
            "cronjob_scan_files": "500",
            "enabled": "yes",
            "installed_version": "1.15.0",
            "types": "filesystem"
        },
        "files_pdfviewer": {
            "enabled": "yes",
            "installed_version": "2.0.2",
            "types": ""
        },
        "files_rightclick": {
            "enabled": "yes",
            "installed_version": "0.17.0",
            "types": ""
        },
        "files_sharing": {
            "enabled": "yes",
            "installed_version": "1.12.2",
            "types": "filesystem"
        },
        "files_trashbin": {
            "enabled": "yes",
            "installed_version": "1.10.1",
            "types": "filesystem,dav"
        },
        "files_versions": {
            "enabled": "yes",
            "installed_version": "1.13.0",
            "types": "filesystem,dav"
        },
        "files_videoplayer": {
            "enabled": "yes",
            "installed_version": "1.9.0",
            "types": ""
        },
        "firstrunwizard": {
            "enabled": "yes",
            "installed_version": "2.9.0",
            "types": "logging"
        },
        "integration_google": {
            "client_id": "30126663322-f4j7181e0ffj4ko7hdehvp5qdsl2d766.apps.googleusercontent.com",
            "client_secret": "c5XiImVtYRkwgmMLdjU_EvKb",
            "enabled": "yes",
            "installed_version": "1.0.2",
            "types": ""
        },
        "logreader": {
            "enabled": "yes",
            "installed_version": "2.5.0",
            "types": ""
        },
        "lookup_server_connector": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": "authentication"
        },
        "nextcloud_announcements": {
            "enabled": "yes",
            "installed_version": "1.9.0",
            "pub_date": "Thu, 24 Oct 2019 00:00:00 +0200",
            "types": "logging"
        },
        "notifications": {
            "enabled": "yes",
            "installed_version": "2.8.0",
            "types": "logging"
        },
        "oauth2": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": "authentication"
        },
        "password_policy": {
            "enabled": "yes",
            "enforceNumericCharacters": "1",
            "enforceSpecialCharacters": "1",
            "enforceUpperLowerCase": "1",
            "installed_version": "1.10.1",
            "minLength": "10",
            "types": "authentication"
        },
        "photos": {
            "enabled": "yes",
            "installed_version": "1.2.3",
            "types": ""
        },
        "privacy": {
            "enabled": "yes",
            "fullDiskEncryptionEnabled": "1",
            "installed_version": "1.4.0",
            "types": ""
        },
        "provisioning_api": {
            "enabled": "yes",
            "installed_version": "1.10.0",
            "types": "prevent_group_restriction"
        },
        "recommendations": {
            "enabled": "yes",
            "installed_version": "0.8.0",
            "types": ""
        },
        "serverinfo": {
            "enabled": "yes",
            "installed_version": "1.10.0",
            "types": ""
        },
        "settings": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": ""
        },
        "sharebymail": {
            "enabled": "yes",
            "installed_version": "1.10.0",
            "types": "filesystem"
        },
        "support": {
            "SwitchUpdaterServerHasRun": "yes",
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": "session"
        },
        "survey_client": {
            "apps": "no",
            "database": "no",
            "enabled": "yes",
            "encryption": "no",
            "files_sharing": "no",
            "installed_version": "1.8.0",
            "last_report": "{\"id\":\"octqsweo9bir\",\"items\":[[\"server\",\"version\",\"20.0.9.1\"],[\"server\",\"code\",\"other\"],[\"server\",\"enable                                                                                   _avatars\",\"yes\"],[\"server\",\"enable_previews\",\"yes\"],[\"server\",\"memcache.local\",\"\\\\OC\\\\Memcache\\\\Redis\"],[\"server\",\"memcache.distri                                                                                   buted\",\"none\"],[\"server\",\"asset-pipeline.enabled\",\"no\"],[\"server\",\"filelocking.enabled\",\"yes\"],[\"server\",\"memcache.locking\",\"\\\\OC\\\                                                                                   \Memcache\\\\Redis\"],[\"server\",\"debug\",\"no\"],[\"server\",\"cron\",\"cron\"],[\"php\",\"version\",\"7.4.15\"],[\"php\",\"memory_limit\",536870912],[                                                                                   \"php\",\"max_execution_time\",0],[\"php\",\"upload_max_filesize\",2097152],[\"database\",\"type\",\"mysql\"],[\"database\",\"version\",\"5.7.34\"],[\"dat                                                                                   abase\",\"size\",16392192],[\"apps\",\"accessibility\",\"1.6.0\"],[\"apps\",\"activity\",\"2.13.4\"],[\"apps\",\"cloud_federation_api\",\"1.3.0\"],[\"apps                                                                                   \",\"comments\",\"1.10.0\"],[\"apps\",\"contactsinteraction\",\"1.1.0\"],[\"apps\",\"dashboard\",\"7.0.0\"],[\"apps\",\"dav\",\"1.16.2\"],[\"apps\",\"fede                                                                                   ratedfilesharing\",\"1.10.2\"],[\"apps\",\"federation\",\"1.10.1\"],[\"apps\",\"files\",\"1.15.0\"],[\"apps\",\"files_pdfviewer\",\"2.0.1\"],[\"apps\",\"f                                                                                   iles_rightclick\",\"0.17.0\"],[\"apps\",\"files_sharing\",\"1.12.2\"],[\"apps\",\"files_trashbin\",\"1.10.1\"],[\"apps\",\"files_versions\",\"1.13.0\"],[\                                                                                   "apps\",\"files_videoplayer\",\"1.9.0\"],[\"apps\",\"firstrunwizard\",\"2.9.0\"],[\"apps\",\"logreader\",\"2.5.0\"],[\"apps\",\"lookup_server_connector\",                                                                                   \"1.8.0\"],[\"apps\",\"nextcloud_announcements\",\"1.9.0\"],[\"apps\",\"notifications\",\"2.8.0\"],[\"apps\",\"oauth2\",\"1.8.0\"],[\"apps\",\"password_po                                                                                   licy\",\"1.10.1\"],[\"apps\",\"photos\",\"1.2.3\"],[\"apps\",\"privacy\",\"1.4.0\"],[\"apps\",\"provisioning_api\",\"1.10.0\"],[\"apps\",\"recommendations                                                                                   \",\"0.8.0\"],[\"apps\",\"serverinfo\",\"1.10.0\"],[\"apps\",\"settings\",\"1.2.0\"],[\"apps\",\"sharebymail\",\"1.10.0\"],[\"apps\",\"support\",\"1.3.0\"                                                                                   ],[\"apps\",\"survey_client\",\"1.8.0\"],[\"apps\",\"systemtags\",\"1.10.0\"],[\"apps\",\"text\",\"3.1.0\"],[\"apps\",\"theming\",\"1.11.0\"],[\"apps\",\"                                                                                   twofactor_backupcodes\",\"1.9.0\"],[\"apps\",\"user_status\",\"1.0.1\"],[\"apps\",\"viewer\",\"1.4.0\"],[\"apps\",\"weather_status\",\"1.0.0\"],[\"apps\",                                                                                   \"workflowengine\",\"2.2.0\"],[\"stats\",\"num_files\",43428],[\"stats\",\"num_users\",2],[\"stats\",\"num_storages\",3],[\"stats\",\"num_storages_local\"                                                                                   ,1],[\"stats\",\"num_storages_home\",2],[\"stats\",\"num_storages_other\",0],[\"stats\",\"num_comments\",0],[\"stats\",\"num_comment_markers\",0],[\"stats                                                                                   \",\"num_systemtags\",0],[\"stats\",\"num_systemtags_mappings\",0],[\"files_sharing\",\"num_shares\",0],[\"files_sharing\",\"num_shares_user\",0],[\"files                                                                                   _sharing\",\"num_shares_groups\",0],[\"files_sharing\",\"num_shares_link\",0],[\"files_sharing\",\"num_shares_link_no_password\",0],[\"files_sharing\",\"n                                                                                   um_fed_shares_sent\",0],[\"files_sharing\",\"num_fed_shares_received\",0],[\"encryption\",\"enabled\",\"no\"],[\"encryption\",\"default_module\",\"no\"]]}                                                                                   ",
            "last_sent": "1623894204",
            "php": "no",
            "server": "no",
            "stats": "no",
            "types": ""
        },
        "systemtags": {
            "enabled": "yes",
            "installed_version": "1.10.0",
            "types": "logging"
        },
        "text": {
            "enabled": "yes",
            "installed_version": "3.1.0",
            "types": "dav"
        },
        "theming": {
            "enabled": "yes",
            "installed_version": "1.11.0",
            "types": "logging"
        },
        "twofactor_backupcodes": {
            "enabled": "yes",
            "installed_version": "1.9.0",
            "types": ""
        },
        "user_status": {
            "enabled": "yes",
            "installed_version": "1.0.1",
            "types": ""
        },
        "viewer": {
            "enabled": "yes",
            "installed_version": "1.4.0",
            "types": ""
        },
        "weather_status": {
            "enabled": "yes",
            "installed_version": "1.0.0",
            "types": ""
        },
        "workflowengine": {
            "enabled": "yes",
            "installed_version": "2.2.1",
            "types": "filesystem"
        }
    }
}

Nextcloud logs

Over-mounts

/var/lib/snapd/snaps/nextcloud_28607.snap on /snap/nextcloud/28607 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide,x-gvfs-hide)
/var/lib/snapd/snaps/nextcloud_28695.snap on /snap/nextcloud/28695 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide,x-gvfs-hide)
nsfs on /run/snapd/ns/nextcloud.mnt type nsfs (rw)

snap version

snap    2.65.3+22.04
snapd   2.65.3+22.04
series  16
ubuntu  24.04
kernel  5.15.0-124-generic

nextcloud version

Name       Version       Rev    Tracking   Publisher   Notes
nextcloud  20.0.13snap1  28607  20/stable  nextcloud✓  disabled
nextcloud  20.0.14snap1  28695  20/stable  nextcloud✓  -

nextcloud interfaces

Interface        Plug                       Slot           Notes
network          nextcloud:network          :network       -
network-bind     nextcloud:network-bind     :network-bind  -
network-observe  nextcloud:network-observe  -              -
removable-media  nextcloud:removable-media  -              -

yip… thats it! See Managing encryption and HTTP/HTTPS port configuration as well as Reverse proxy configuration and 101: reverse proxy

if you’re running multiple services a reverse proxy would be your best option. Nextcloud snap encryption will not work on port 77 as Nextcloud snap automated encryption requires port 80 and 443 for lets encrypt certification. alternatively put apache on port 77 and leave the snap on port 80 and 443…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.