Nextcloud 31.0.7 not reachable 503 >> Your web server is not properly set up to resolve “/ocm-provider/” Help needed!

Creating a bug report/issue

X I have searched the existing open and closed issues

Hi there and mostly Joulinar and other experts

I need help, my Nextcloud server isn’t reachable anymore. I suppose an error in webserver. I’ve read in so much forums the last 3 days and don’t get any progress to resolve the issue. I will provide some attachments with the relevant files about my system. Let me know if you need more information. Your help is much appreciated! Greetings from Switzerland. Televisor

Required Information

  • DietPi version | cat /boot/dietpi/.version
    G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=15
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’

  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
    bookworm 0

  • Kernel version | uname --all
    Linux NC-Server 6.12.34+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26) aarch64 GNU/Linux

  • Architecture | dpkg --print-architecture
    armhf

  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)
    RPi 4 Model B (aarch64)

  • Power supply used | (EG: 5V 1A RAVpower)
    official USB-C Raspberry Power Adapter

  • SD card used | (EG: SanDisk ultra)
    No SD card, direct USB-3 connected SSD WD Red SA500 via Argon ONE V2 Case

Additional Information (if applicable)

  • Software title | (EG: Nextcloud)
    Nextcloud 31.0.7
  • Was the software title installed freshly or updated/migrated?
    freshly installed 2-3 years ago and updated in regular periods, last end of July
  • Can this issue be replicated on a fresh installation of DietPi?
    ← If you sent a “dietpi-bugreport”, please paste the ID here →
  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

Expected behaviour

Actual behaviour

  • Response from website: 503 Service Unavailable

Extra details

  • ncc setupcheck
    	dav:
    		✓ DAV system address book: No outstanding DAV system address book sync.
    	network:
    		✗ WebDAV endpoint: Your web server is not yet properly set up to allow file synchronization, because the WebDAV interface seems to be broken.
    To allow this check to run you have to make sure that your Web server can connect to itself. Therefore it must be able to resolve and connect to at least one of its `trusted_domains` or the `overwrite.cli.url`. This failure may be the result of a server-side DNS mismatch or outbound firewall rule.
    		✓ Data directory protected
    		✓ Internet connectivity
    		✓ JavaScript source map support
    		✓ JavaScript modules support
    		⚠ OCS provider resolving: Your web server is not properly set up to resolve "/ocm-provider/", "/ocs-provider/".
    This is most likely related to a web server configuration that was not updated to deliver this folder directly.
    Please compare your configuration against the shipped rewrite rules in ".htaccess" for Apache or the provided one in the documentation for Nginx.
    On Nginx those are typically the lines starting with "location ~" that need an update.
    		⚠ .well-known URLs: Your web server is not properly set up to resolve `.well-known` URLs, failed on:
    `/.well-known/webfinger`
    
  • dietpi-services status
    
     DietPi-Services
    ─────────────────────────────────────────────────────
     Mode: status 
    
    [  OK  ] DietPi-Services | vsftpd		active (running) since Wed 2025-08-13 14:02:53 CEST; 49min ago
    [  OK  ] DietPi-Services | nmbd			active (running) since Wed 2025-08-13 14:02:54 CEST; 49min ago
    [  OK  ] DietPi-Services | smbd			active (running) since Wed 2025-08-13 14:02:54 CEST; 49min ago
    [  OK  ] DietPi-Services | nfs-server		active (exited) since Wed 2025-08-13 14:02:55 CEST; 49min ago
    [  OK  ] DietPi-Services | redis-server		active (running) since Wed 2025-08-13 14:02:55 CEST; 49min ago
    [  OK  ] DietPi-Services | mariadb		active (running) since Wed 2025-08-13 14:02:56 CEST; 49min ago
    [  OK  ] DietPi-Services | php8.2-fpm		active (running) since Wed 2025-08-13 14:02:57 CEST; 49min ago
    [  OK  ] DietPi-Services | lighttpd		active (running) since Wed 2025-08-13 14:02:58 CEST; 49min ago
    [  OK  ] DietPi-Services | cron			active (running) since Wed 2025-08-13 14:02:58 CEST; 49min ago
    [  OK  ] DietPi-Services | dropbear		active (running) since Wed 2025-08-13 13:50:31 CEST; 1h 2min ago
    [ INFO ] DietPi-Services | dietpi-vpn		inactive (dead)
    [ INFO ] DietPi-Services | dietpi-cloudshell	inactive (dead)
    [  OK  ] DietPi-Services | dietpi-ramlog	active (exited) since Wed 2025-08-13 13:50:24 CEST; 1h 2min ago
    [  OK  ] DietPi-Services | dietpi-preboot	active (exited) since Wed 2025-08-13 13:50:24 CEST; 1h 2min ago
    [  OK  ] DietPi-Services | dietpi-postboot	active (exited) since Wed 2025-08-13 13:50:31 CEST; 1h 2min ago
    [ INFO ] DietPi-Services | dietpi-wifi-monitor	inactive (dead)
    
  • cat config.php
    
    <?php
    $CONFIG = array (
      'passwordsalt' => '**********************',
      'secret' => '**********************',
      'trusted_domains' => 
      array (
        0 => 'localhost',
        1 => '*',
      ),
      'datadirectory' => '/mnt/dietpi_userdata/nextcloud_data',
      'dbtype' => 'mysql',
      'version' => '31.0.7.1',
      'hashingThreads' => 4,
      'memcache.local' => '\\OC\\Memcache\\APCu',
      'filelocking.enabled' => true,
      'memcache.locking' => '\\OC\\Memcache\\Redis',
      'redis' => 
      array (
        'host' => '/run/redis/redis-server.sock',
        'port' => 0,
      ),
      'overwrite.cli.url' => 'https://my.domain.org/nextcloud',
      'dbname' => 'nextcloud',
      'dbhost' => 'localhost',
      'dbport' => '',
      'dbtableprefix' => 'oc_',
      'mysql.utf8mb4' => true,
      'dbuser' => 'oc_admin',
      'dbpassword' => '**********************',
      'installed' => true,
      'instanceid' => 'ocr8bz1vl72z',
      'mail_from_address' => '**********************',
      'mail_smtpmode' => 'smtp',
      'mail_sendmailmode' => 'smtp',
      'mail_domain' => 'gmx.net',
      'mail_smtpauth' => 1,
      'mail_smtpauthtype' => 'LOGIN',
      'mail_smtpsecure' => 'tls',
      'mail_smtphost' => 'mail.gmx.net',
      'mail_smtpport' => '587',
      'mail_smtpname' => '**********************',
      'mail_smtppassword' => '**********************',
      'default_phone_region' => 'CH',
      'maintenance' => false,
      'theme' => '',
      'loglevel' => 2,
      'updater.release.channel' => 'stable',
      'enable_previews' => true,
      'preview_max_memory' => 3072,
      'enabledPreviewProviders' => 
      array (
        0 => 'OC\\Preview\\Movie',
        1 => 'OC\\Preview\\MP4',
        2 => 'OC\\Preview\\AVI',
        3 => 'OC\\Preview\\PNG',
        4 => 'OC\\Preview\\JPEG',
        5 => 'OC\\Preview\\GIF',
        6 => 'OC\\Preview\\BMP',
        7 => 'OC\\Preview\\XBitmap',
        8 => 'OC\\Preview\\MP3',
        9 => 'OC\\Preview\\TXT',
        10 => 'OC\\Preview\\MarkDown',
        11 => 'OC\\Preview\\PDF',
        12 => 'OC\\Preview\\Image',
        13 => 'OC\\Preview\\HEIC',
      ),
      'preview_ffmpeg_path' => '/usr/bin/ffmpeg',
      'memories.db.triggers.fcu' => true,
      'memories.exiftool' => '/var/www/nextcloud/apps/memories/bin-ext/exiftool-aarch64-glibc',
      'memories.vod.path' => '/var/www/nextcloud/apps/memories/bin-ext/go-vod-aarch64',
      'memories.vod.ffmpeg' => '/usr/bin/ffmpeg',
      'memories.vod.ffprobe' => '/usr/bin/ffprobe',
      'memories.exiftool_no_local' => true,
      'memories.gis_type' => 1,
      'app_install_overwrite' => 
      array (
      ),
      'maintenance_window_start' => 1,
      'defaultapp' => 'files',
    );
    
  • systemctl status lighttpd
    
    ● lighttpd.service - Lighttpd Daemon
         Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; preset: enabled)
        Drop-In: /etc/systemd/system/lighttpd.service.d
                 └─dietpi.conf
         Active: active (running) since Tue 2025-08-12 18:08:03 CEST; 3h 0min ago
        Process: 907 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
       Main PID: 984 (lighttpd)
          Tasks: 1 (limit: 4486)
            CPU: 5.573s
         CGroup: /system.slice/lighttpd.service
                 └─984 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
    
  • dpkg -l lighttpd
    
    Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
    | Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
             Halb installiert/Trigger erWartet/Trigger anhängig
    |/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
    ||/ Name           Version      Architektur  Beschreibung
    +++-==============-============-============-============================================
    ii  lighttpd       1.4.69-1     armhf        fast webserver with minimal memory footprint
    
  • cat /var/log/lighttpd/error.log
    
    2025-08-12 21:30:06: (server.c.2078) server stopped by UID = 0 PID = 1
    2025-08-12 21:30:07: (server.c.1704) server started (lighttpd/1.4.69)
    2025-08-12 21:30:07: (configfile.c.1289) WARNING: unknown config-key: dir-listing.activate (ignored)
    2025-08-12 21:30:22: (gw_backend.c.274) establishing connection failed: socket: unix:/run/php/php-fpm.sock: No such file or directory
    2025-08-12 21:30:22: (gw_backend.c.960) all handlers for /nextcloud/index.php? on .php are down.
    2025-08-12 21:30:25: (gw_backend.c.351) gw-server re-enabled: unix:/run/php/php-fpm.sock  0 /run/php/php-fpm.sock
    2025-08-12 21:30:36: (gw_backend.c.274) establishing connection failed: socket: unix:/run/php/php-fpm.sock: No such file or directory
    2025-08-12 21:30:36: (gw_backend.c.960) all handlers for /nextcloud/index.php? on .php are down.
    2025-08-12 21:30:38: (gw_backend.c.351) gw-server re-enabled: unix:/run/php/php-fpm.sock  0 /run/php/php-fpm.sock
    
  • dietpi-letsencrypt 
    
     DietPi-LetsEncrypt
    ─────────────────────────────────────────────────────
     Mode: Running Certbot
    
    [  OK  ] DietPi-LetsEncrypt | Lighttpd webserver detected
    [  OK  ] DietPi-LetsEncrypt | systemctl start lighttpd
    Saving debug log to /var/log/letsencrypt/letsencrypt.log
    
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    An RSA certificate named my.domain.org/ already exists. Do you want to
    update its key type to ECDSA?
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    (U)pdate key type/(K)eep existing key type: K
    Certificate not yet due for renewal
    
    You have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry.
    (ref: /etc/letsencrypt/renewal/my.domain.org.conf)
    
    What would you like to do?
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    1: Keep the existing certificate for now
    2: Renew & replace the certificate (may be subject to CA rate limits)
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
    Renewing an existing certificate for my.domain.org
    
    Successfully received certificate.
    Certificate is saved at: /etc/letsencrypt/live/my.domain.org/fullchain.pem
    Key is saved at:         /etc/letsencrypt/live/my.domain.org/privkey.pem
    This certificate expires on 2025-11-10.
    These files will be updated when the certificate renews.
    Certbot has set up a scheduled task to automatically renew this certificate in the background.
    
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    If you like Certbot, please consider supporting our work by:
     * Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
     * Donating to EFF:                    https://eff.org/donate-le
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    [ INFO ] DietPi-LetsEncrypt | Checking for required APT packages: lighttpd-mod-openssl
    [  OK  ] DietPi-LetsEncrypt | Desired setting in /etc/lighttpd/lighttpd.conf was already set:  	"mod_redirect",
    [ INFO ] DietPi-LetsEncrypt | Applying HTTPS domain to known web application configs
    [  OK  ] DietPi-LetsEncrypt | sed --follow-symlinks -i s|'http://localhost/nextcloud'|'https://my.domain.org/nextcloud'| /var/www/nextcloud/config/config.php
    [  OK  ] DietPi-LetsEncrypt | systemctl restart lighttpd
    [  OK  ] DietPi-LetsEncrypt | eval echo -e '#!/bin/dash\nsystemctl reload lighttpd' > /etc/letsencrypt/renewal-hooks/deploy/dietpi-lighttpd.sh
    [  OK  ] DietPi-LetsEncrypt | chmod +x /etc/letsencrypt/renewal-hooks/deploy/dietpi-lighttpd.sh
    
  • /etc/php/8.2/mods-available# cat dietpi.ini
    
    ; DietPi PHP settings
    ; priority=97
    session.save_path="/run/php_sessions"
    upload_tmp_dir="/tmp"
    upload_max_filesize=512M
    post_max_size=512M
    opcache.memory_consumption=128
    opcache.revalidate_freq=60
    apc.shm_size=64M
    apc.ttl=259200
    
  • /etc/php/8.2/mods-available# cat dietpi-nextcloud.ini 
    
    ; Nextcloud PHP settings
    ; priority=98
    memory_limit=512M
    opcache.revalidate_freq=5
    opcache.interned_strings_buffer=32
    apc.enable_cli=1
    

So my research went further and I made progress to resolve by myself! The hint was in lighttpd log file “establishing connection failed: socket: unix:/run/php/php-fpm.sock: No such file or directory“.

I replaced “php-fpm.sock“ in “15-fastcgi-php-fpm.conf“ with “php8.2-fpm.sock“ and got instantly access to my Nextcloud instance again.

Problem solved, please close this issue.

1 Like

Glad to hear you resolved your issue! :slight_smile: I would suggest creating a symlink instead:
sudo ln -s php8.2-fpm.sock php-fpm.sock

This way, you won’t need to modify multiple configuration files when the PHP version changes in the future. DietPi usually preserves user configuration files and symlinks during upgrades.

1 Like

Good input - thanks!

Hi,

sorry for late response. I had a look on how PHP socket should looks like. I did a test installation and these files are located in /run/php/

root@DietPiR5S:~# ls -la /run/php
total 4
drwxr-xr-x  2 www-data www-data 100 Aug 15 11:24 .
drwxr-xr-x 21 root     root     620 Aug 15 11:24 ..
lrwxrwxrwx  1 root     root      30 Aug 15 11:19 php-fpm.sock -> /etc/alternatives/php-fpm.sock
-rw-r--r--  1 root     root       5 Aug 15 11:24 php8.2-fpm.pid
srw-rw----  1 www-data www-data   0 Aug 15 11:24 php8.2-fpm.sock
root@DietPiR5S:~#

As you can see, php-fpm.sock is linked to /etc/alternatives/php-fpm.sock

And this is linked again :slight_smile:

root@DietPiR5S:/etc/alternatives# ls -la /etc/alternatives/php-fpm.sock
lrwxrwxrwx 1 root root 24 Aug 15 11:19 /etc/alternatives/php-fpm.sock -> /run/php/php8.2-fpm.sock

Close to what @CircuitScribe already recommended

1 Like

be careful, your commands are incorrect

The command

ln -s /run/php-fpm.sock /etc/alternatives/php-fpm.sock

will create a symbolic link at

/etc/alternatives/php-fpm.sock

that points to

/run/php-fpm.sock

But it’s the other way around :wink: Same goes for the 2nd command.

And the socket is located at /run/php/php-fpm.sock not /run/php-fpm.sock

thanks again @Joulinar for catching this one, deleted post with my errors!

The symlink-loop over /etc/alternatives to allowrapid switching if multiple php versions installed.

So the links for the sockets should look like this:

/run/php/php-fpm.sock → /etc/alternatives/php-fpm.sock

/etc/alternatives/php-fpm.sock → /run/php/php8.2-fpm.sock

and analogous loop for php versions:

/usr/bin/php → /etc/alternatives/php 

/etc/alternatives/php → /usr/bin/php8.2

if for some reason these links are missing and and an error "php-fpm.sock: No such file or directory“ occurs, the following commands should restore the corresponding missing dymbolic links (Usage: ln [OPTION]… [-T] TARGET LINK_NAME)

sudo ln -s /etc/alternatives/php-fpm.sock /run/php/php-fpm.sock
sudo ln -s /run/php/php8.2-fpm.sock /etc/alternatives/php-fpm.sock