From d9913c4c172e8f3a833ca867f6de368c339e69e6 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Thu, 26 Feb 2026 13:56:06 +0100 Subject: [PATCH] fix: Mailserver webmail LXC detection, Nextcloud nginx MIME types - luci.mailserver: Detect LXC containers for webmail status (not just Docker) - docs: Add nginx static file fix and webmail detection to HISTORY/WIP Co-Authored-By: Claude Opus 4.5 --- .claude/HISTORY.md | 15 +++++++++++++++ .claude/WIP.md | 11 +++++++++++ .../root/usr/libexec/rpcd/luci.mailserver | 9 +++++++-- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/.claude/HISTORY.md b/.claude/HISTORY.md index f158ef64..51239b1f 100644 --- a/.claude/HISTORY.md +++ b/.claude/HISTORY.md @@ -3778,3 +3778,18 @@ git checkout HEAD -- index.html - **Nextcloud Configuration:** - Set `spreed.signaling_servers` via occ command - Endpoint: `https://signaling.gk2.secubox.in/standalone-signaling/` + +44. **Nextcloud nginx Static File Fix (2026-02-26)** + - **Problem:** Talk app CSS/JS blocked with "incorrect MIME type (text/html)" + - **Root Cause:** nginx `/apps/` location block with `^~` modifier was catching all static file requests and routing them to PHP (which returned HTML) + - **Fix:** Removed problematic `/apps/` location block from nginx config + - Static files now correctly served with proper MIME types: + - CSS: `text/css` + - JS: `application/javascript` + - Talk app loads correctly for video calls + +45. **Mail Server Webmail Detection Fix (2026-02-26)** + - **Problem:** Webmail status showing "Stopped" despite Roundcube LXC running + - **Root Cause:** RPCD handler only checked Docker, not LXC containers + - **Fix:** Added `webmail.type` UCI option check, use `lxc-info` for LXC type + - Webmail status now correctly shows "Running" for LXC containers diff --git a/.claude/WIP.md b/.claude/WIP.md index 43a746e7..679fd0c5 100644 --- a/.claude/WIP.md +++ b/.claude/WIP.md @@ -102,6 +102,17 @@ _Last updated: 2026-02-25 (Factory Dashboard LuCI)_ - Automatic sync every 5 minutes via SSH-based cron job - Deployed p2p-mesh.sh to clone for block generation +- **Nextcloud nginx Static File Fix** — DONE (2026-02-26) + - Talk app CSS/JS blocked with "incorrect MIME type (text/html)" + - Root cause: `/apps/` location block with `^~` modifier catching static files + - Fix: Removed problematic location block, static files now served correctly + - Talk video calls now functional + +- **Mail Server Webmail Detection Fix** — DONE (2026-02-26) + - Webmail status showed "Stopped" despite Roundcube LXC running + - Root cause: RPCD only checked Docker, not LXC containers + - Fix: Added `webmail.type` UCI check, use `lxc-info` for LXC + ### Just Completed (2026-02-25) - **MetaBlogizer HAProxy Stability** — DONE (2026-02-25) diff --git a/package/secubox/luci-app-mailserver/root/usr/libexec/rpcd/luci.mailserver b/package/secubox/luci-app-mailserver/root/usr/libexec/rpcd/luci.mailserver index de04774b..6e7d7c39 100644 --- a/package/secubox/luci-app-mailserver/root/usr/libexec/rpcd/luci.mailserver +++ b/package/secubox/luci-app-mailserver/root/usr/libexec/rpcd/luci.mailserver @@ -69,9 +69,14 @@ case "$1" in # Webmail webmail_container=$(uci -q get $CONFIG.webmail.container) - webmail_container="${webmail_container:-secubox-webmail}" + webmail_container="${webmail_container:-roundcube}" + webmail_type=$(uci -q get $CONFIG.webmail.type) webmail_running=0 - docker ps 2>/dev/null | grep -q "$webmail_container" && webmail_running=1 + if [ "$webmail_type" = "lxc" ]; then + lxc-info -n "$webmail_container" 2>/dev/null | grep -q "RUNNING" && webmail_running=1 + else + docker ps 2>/dev/null | grep -q "$webmail_container" && webmail_running=1 + fi # Mesh mesh_enabled=$(uci -q get $CONFIG.mesh.enabled)