44 lines
1.0 KiB
Plaintext
44 lines
1.0 KiB
Plaintext
# nginx example for web.eventbuzz.live
|
|
#
|
|
# Deploy the Vite build output from `web/dist` and keep custom microsites on disk
|
|
# at MICROSITE_STATIC_ROOT (same layout as today).
|
|
#
|
|
# Order matters: slug-based static locations must not capture /event/... paths.
|
|
|
|
server {
|
|
listen 443 ssl http2;
|
|
server_name web.eventbuzz.live;
|
|
|
|
# ssl_certificate ...
|
|
# ssl_certificate_key ...
|
|
|
|
# Custom static microsites (publishFolder slugs, optional _draft suffix)
|
|
location ~ ^/[a-z0-9-]+(_draft)?/ {
|
|
root /var/www/microsites;
|
|
try_files $uri $uri/ $uri/index.html =404;
|
|
}
|
|
|
|
# React SPA — event-centric routes and assets
|
|
root /var/www/eventbuzz-web/dist;
|
|
index index.html;
|
|
|
|
location /event/ {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /assets/ {
|
|
try_files $uri =404;
|
|
expires 7d;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|
|
|
|
# Local development
|
|
# - API: http://localhost:3001/api
|
|
# - Web SPA: cd web && npm run dev (port 5175)
|
|
# - Dashboard: cd frontend && npm run dev
|