fix deploy paths, route api through /agw/api/, add htaccess rewrite rule

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-02 21:50:36 +01:00
parent fa47c4fd07
commit fa02c4b71f
2 changed files with 6 additions and 3 deletions

View File

@@ -78,10 +78,10 @@ r "systemctl --user status $SERVICE_NAME --no-pager" || true
# --- Web backend (reverse proxy) ---
echo "==> Configuring web backend for /agw-api/"
r "uberspace web backend add /agw-api PORT $BACKEND_PORT --remove-prefix --force --wait" 2>/dev/null || true
echo "==> Configuring web backend for /agw/api/"
r "uberspace web backend add /agw/api PORT $BACKEND_PORT --remove-prefix --force --wait" 2>/dev/null || true
echo ""
echo "Done."
echo " PWA: https://$REMOTE_USER.uber.space/agw/"
echo " Backend: https://$REMOTE_USER.uber.space/agw-api/"
echo " Backend: https://$REMOTE_USER.uber.space/agw/api/"

View File

@@ -1,6 +1,9 @@
RewriteEngine On
RewriteBase /agw/
# Let the backend reverse proxy handle /agw/api/
RewriteRule ^api(/|$) - [L]
# If the requested file or directory exists, serve it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d