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:
@@ -78,10 +78,10 @@ r "systemctl --user status $SERVICE_NAME --no-pager" || true
|
|||||||
|
|
||||||
# --- Web backend (reverse proxy) ---
|
# --- Web backend (reverse proxy) ---
|
||||||
|
|
||||||
echo "==> Configuring web backend for /agw-api/"
|
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
|
r "uberspace web backend add /agw/api PORT $BACKEND_PORT --remove-prefix --force --wait" 2>/dev/null || true
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo " PWA: https://$REMOTE_USER.uber.space/agw/"
|
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/"
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteBase /agw/
|
RewriteBase /agw/
|
||||||
|
|
||||||
|
# Let the backend reverse proxy handle /agw/api/
|
||||||
|
RewriteRule ^api(/|$) - [L]
|
||||||
|
|
||||||
# If the requested file or directory exists, serve it directly
|
# If the requested file or directory exists, serve it directly
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
|||||||
Reference in New Issue
Block a user