Fix: jamulix.de/ leitet wieder auf /landingpage/ weiter
Statt Symlink index.html → landingpage/index.html legen die Deploy-Skripte jetzt webroot/index.html (meta-refresh + location.replace) in den Webroot. README: Deploy-Schritte aktualisiert, Fehlerseiten-Konfig auf nginx (error_page) statt Apache korrigiert. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9c7e1ce4db
commit
c1c0061492
1 changed files with 40 additions and 16 deletions
25
README.md
25
README.md
|
|
@ -97,7 +97,8 @@ Die E-Mail im Footer (`footer.tsx`) wird als Prop von `app/page.tsx` übergeben:
|
|||
- Baut die Seite (`npm run build`)
|
||||
- Öffnet eine SSH-Master-Verbindung (Passwort nur einmal eingeben)
|
||||
- rsync nach `jamulix.de:/var/www/jamulix.de/html/landingpage/`
|
||||
- Setzt Symlink: `/var/www/jamulix.de/html/index.html` → `landingpage/index.html`
|
||||
- Lädt `webroot/index.html` nach `/var/www/jamulix.de/html/index.html` hoch
|
||||
(Weiterleitung von `jamulix.de/` auf `/landingpage/`)
|
||||
- Kopiert die Fehlerseiten `landingpage/<code>.html` in den Webroot
|
||||
|
||||
### Localhost (zum Testen)
|
||||
|
|
@ -107,7 +108,7 @@ Die E-Mail im Footer (`footer.tsx`) wird als Prop von `app/page.tsx` übergeben:
|
|||
```
|
||||
|
||||
- rsync nach `/var/www/html/landingpage/`
|
||||
- Symlink: `/var/www/html/index.html` → `landingpage/index.html`
|
||||
- Kopiert `webroot/index.html` (Weiterleitung) nach `/var/www/html/index.html`
|
||||
- Kopiert die Fehlerseiten in den Webroot
|
||||
- `sudo chown -R www-data:www-data`
|
||||
|
||||
|
|
@ -134,20 +135,20 @@ Gemeinsames Layout: `components/error-page.tsx`. Der Build erzeugt
|
|||
`<webroot>/<code>.html`. Alle Asset-Pfade sind absolut (`/landingpage/_next/…`),
|
||||
daher funktionieren die Kopien im Webroot genauso.
|
||||
|
||||
Damit Apache sie ausliefert, braucht die vHost-Konfiguration (nicht Teil
|
||||
Damit nginx sie ausliefert, braucht der `server`-Block (nicht Teil
|
||||
dieses Repos) z. B.:
|
||||
|
||||
```apache
|
||||
ErrorDocument 401 /401.html
|
||||
ErrorDocument 403 /403.html
|
||||
ErrorDocument 404 /404.html
|
||||
ErrorDocument 500 /500.html
|
||||
ErrorDocument 502 /502.html
|
||||
ErrorDocument 503 /503.html
|
||||
ErrorDocument 504 /504.html
|
||||
```nginx
|
||||
error_page 401 /401.html;
|
||||
error_page 403 /403.html;
|
||||
error_page 404 /404.html;
|
||||
error_page 500 /500.html;
|
||||
error_page 502 /502.html;
|
||||
error_page 503 /503.html;
|
||||
error_page 504 /504.html;
|
||||
```
|
||||
|
||||
- `ErrorDocument 401` muss ein lokaler Pfad sein, keine vollständige URL.
|
||||
- Ziel muss ein lokaler Pfad sein, keine vollständige URL (sonst wird daraus ein Redirect).
|
||||
- Die 401-Seite erscheint erst, wenn der Login-Dialog des Browsers abgebrochen wird.
|
||||
|
||||
---
|
||||
|
|
|
|||
Loading…
Reference in a new issue