vcard4reseller/deploy/compose/nginx.prod.conf
Thomas Peterson faece5870d Deploy-Fix: nginx routet /w (Wallet) zum Backend + nginx-Recreate bei Rollout
- nginx.prod.conf: /w (Wallet-Landing, .pkpass, Google-Redirect, Logo) fehlte in
  der Backend-Location-Regex → Wallet-Routen landeten in der SPA (index.html).
- update.sh: nginx.prod.conf ist ein Single-File-Bind-Mount (am Inode gepinnt);
  git reset ersetzt die Datei → nginx-Container force-recreaten, damit die
  aktuelle Config greift (statt nur reload).

Live-Nodes bereits nachgezogen; Apple-Wallet-Pass funktioniert über Caddy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 09:17:30 +02:00

40 lines
1.0 KiB
Plaintext

# Routing auf dem App-Node:
# /api, /p, /t, /w, /css, /bundles, /health → Symfony (PHP-FPM)
# alles andere → Vue-SPA (history-fallback)
server {
listen 80;
server_name _;
# Standard: SPA-Build
root /spa;
index index.html;
client_max_body_size 32m;
# Symfony-Pfade (API + serverseitige öffentliche Seiten + interne Endpunkte)
location ~ ^/(api|p|t|w|css|bundles|health|internal)(/|$) {
root /app/public;
try_files $uri /index.php$is_args$args;
}
location ~ ^/index\.php(/|$) {
root /app/public;
fastcgi_pass php:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $document_root;
internal;
}
# SPA-Routing (history mode)
location / {
try_files $uri /index.html;
}
# direkte .php-Aufrufe blockieren
location ~ \.php$ {
return 404;
}
}