From fe8c3aaf5e4a0e9e7288be5baa2e160bc44934d1 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Tue, 17 Feb 2026 03:44:24 +0100 Subject: [PATCH] fix(nextcloud): Add /apps/ nginx location to fix 403 errors The /apps/dashboard/ and other app paths were returning 403 Forbidden because nginx was matching the directory via try_files before routing to PHP. Added explicit location ^~ /apps/ to rewrite to index.php. Co-Authored-By: Claude Opus 4.5 --- .../secubox-app-nextcloud/files/usr/sbin/nextcloudctl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/secubox/secubox-app-nextcloud/files/usr/sbin/nextcloudctl b/package/secubox/secubox-app-nextcloud/files/usr/sbin/nextcloudctl index 83b7d5a2..fb1d247a 100644 --- a/package/secubox/secubox-app-nextcloud/files/usr/sbin/nextcloudctl +++ b/package/secubox/secubox-app-nextcloud/files/usr/sbin/nextcloudctl @@ -400,6 +400,11 @@ server { location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; } location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; } + # Route /apps/* through index.php (fix 403 on app directories) + location ^~ /apps/ { + rewrite ^ /index.php\$request_uri last; + } + location ~ \.php(?:$|/) { rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode(_arm64)?\/proxy) /index.php$request_uri;