Deploy: index.html wieder als Symlink auf landingpage/index.html

nginx folgt dem Link und liefert die Landingpage direkt unter
https://jamulix.de/ aus. Weiterleitungsseite webroot/index.html entfernt,
README angepasst.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Dieter Schlüter 2026-10-07 20:07:24 +02:00
commit 74b8d18991
4 changed files with 8 additions and 34 deletions

View file

@ -40,8 +40,6 @@ components/
ui/ # shadcn/ui-Basiskomponenten ui/ # shadcn/ui-Basiskomponenten
public/ public/
Programmierer.png # Foto (statischer Import in programmer-graphic.tsx) Programmierer.png # Foto (statischer Import in programmer-graphic.tsx)
webroot/
index.html # Weiterleitung jamulix.de/ → /landingpage/ (vom Deploy in den Webroot kopiert)
``` ```
--- ---
@ -103,8 +101,8 @@ Die E-Mail im Footer (`footer.tsx`) wird als Prop von `app/page.tsx` übergeben:
- Baut die Seite (`npm run build`) - Baut die Seite (`npm run build`)
- Öffnet eine SSH-Master-Verbindung (Passwort nur einmal eingeben) - Öffnet eine SSH-Master-Verbindung (Passwort nur einmal eingeben)
- rsync nach `jamulix.de:/var/www/jamulix.de/html/landingpage/` - rsync nach `jamulix.de:/var/www/jamulix.de/html/landingpage/`
- Lädt `webroot/index.html` nach `/var/www/jamulix.de/html/index.html` hoch - Setzt Symlink: `/var/www/jamulix.de/html/index.html` → `landingpage/index.html`
(Weiterleitung von `jamulix.de/` auf `/landingpage/`) (nginx folgt dem Link und liefert die Landingpage direkt unter `https://jamulix.de/` aus)
- Kopiert die Fehlerseiten `landingpage/<code>.html` in den Webroot - Kopiert die Fehlerseiten `landingpage/<code>.html` in den Webroot
### Localhost (zum Testen) ### Localhost (zum Testen)
@ -114,7 +112,7 @@ Die E-Mail im Footer (`footer.tsx`) wird als Prop von `app/page.tsx` übergeben:
``` ```
- rsync nach `/var/www/html/landingpage/` - rsync nach `/var/www/html/landingpage/`
- Kopiert `webroot/index.html` (Weiterleitung) nach `/var/www/html/index.html` - Symlink: `/var/www/html/index.html` → `landingpage/index.html`
- Kopiert die Fehlerseiten in den Webroot - Kopiert die Fehlerseiten in den Webroot
- `sudo chown -R www-data:www-data` - `sudo chown -R www-data:www-data`
@ -141,8 +139,7 @@ Gemeinsames Layout: `components/error-page.tsx`. Der Build erzeugt
`<webroot>/<code>.html`. Alle Asset-Pfade sind absolut (`/landingpage/_next/…`), `<webroot>/<code>.html`. Alle Asset-Pfade sind absolut (`/landingpage/_next/…`),
daher funktionieren die Kopien im Webroot genauso. daher funktionieren die Kopien im Webroot genauso.
Damit nginx sie ausliefert, braucht der `server`-Block (nicht Teil Der nginx-`server`-Block für jamulix.de (nicht Teil dieses Repos) enthält dafür:
dieses Repos) z. B.:
```nginx ```nginx
error_page 401 /401.html; error_page 401 /401.html;

View file

@ -14,11 +14,9 @@ npm run build
echo "Synchronisiere landingpage/ nach /var/www/html/landingpage/..." echo "Synchronisiere landingpage/ nach /var/www/html/landingpage/..."
sudo rsync -av --delete landingpage/ /var/www/html/landingpage/ sudo rsync -av --delete landingpage/ /var/www/html/landingpage/
echo "Setze Weiterleitung: index.html → /landingpage/" echo "Setze symbolischen Link: index.html → landingpage/index.html"
# rm zuerst: ein alter Symlink würde sonst landingpage/index.html überschreiben
sudo rm -f /var/www/html/index.html sudo rm -f /var/www/html/index.html
sudo cp webroot/index.html /var/www/html/index.html sudo ln -s landingpage/index.html /var/www/html/index.html
sudo chown www-data:www-data /var/www/html/index.html
echo "Kopiere Fehlerseiten: landingpage/<code>.html → <code>.html" echo "Kopiere Fehlerseiten: landingpage/<code>.html → <code>.html"
for c in $ERROR_PAGES; do for c in $ERROR_PAGES; do

View file

@ -28,10 +28,8 @@ npm run build
echo "Synchronisiere landingpage/ nach $REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR/landingpage/..." echo "Synchronisiere landingpage/ nach $REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR/landingpage/..."
rsync -av --delete -e "ssh -S $SSH_SOCKET" landingpage/ "$REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR/landingpage/" rsync -av --delete -e "ssh -S $SSH_SOCKET" landingpage/ "$REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR/landingpage/"
echo "Setze Weiterleitung: index.html → /landingpage/" echo "Setze symbolischen Link: index.html → landingpage/index.html"
# rm zuerst: ein alter Symlink würde sonst landingpage/index.html überschreiben ssh -S "$SSH_SOCKET" "$REMOTE_USER@$REMOTE_HOST" "rm -f '$REMOTE_DIR/index.html' && ln -s landingpage/index.html '$REMOTE_DIR/index.html'"
ssh -S "$SSH_SOCKET" "$REMOTE_USER@$REMOTE_HOST" "rm -f '$REMOTE_DIR/index.html'"
rsync -av -e "ssh -S $SSH_SOCKET" webroot/index.html "$REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR/index.html"
echo "Kopiere Fehlerseiten: landingpage/<code>.html → <code>.html" echo "Kopiere Fehlerseiten: landingpage/<code>.html → <code>.html"
ssh -S "$SSH_SOCKET" "$REMOTE_USER@$REMOTE_HOST" "for c in $ERROR_PAGES; do cp '$REMOTE_DIR'/landingpage/\$c.html '$REMOTE_DIR'/\$c.html; done" ssh -S "$SSH_SOCKET" "$REMOTE_USER@$REMOTE_HOST" "for c in $ERROR_PAGES; do cp '$REMOTE_DIR'/landingpage/\$c.html '$REMOTE_DIR'/\$c.html; done"

View file

@ -1,19 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="refresh" content="0; url=/landingpage/">
<link rel="canonical" href="https://jamulix.de/landingpage/">
<title>jamulix.de</title>
<style>
body { margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
background: #0b1020; color: #c9cbe0; font-family: system-ui, sans-serif; }
a { color: #a78bfa; }
</style>
<script>location.replace('/landingpage/');</script>
</head>
<body>
<p>Weiter zu <a href="/landingpage/">jamulix.de/landingpage/</a></p>
</body>
</html>