From fa02c4b71fb272b496cc75494d4b8da4523908d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20F=C3=B6rtsch?= Date: Mon, 2 Mar 2026 21:50:36 +0100 Subject: [PATCH] fix deploy paths, route api through /agw/api/, add htaccess rewrite rule Co-Authored-By: Claude Opus 4.6 --- deploy.sh | 6 +++--- public/.htaccess | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/deploy.sh b/deploy.sh index 17a88bd..1fe08af 100755 --- a/deploy.sh +++ b/deploy.sh @@ -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/" diff --git a/public/.htaccess b/public/.htaccess index 401ecad..afd36a7 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -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