25 lines
619 B
Plaintext
25 lines
619 B
Plaintext
# Nginx config for serving Vite-built static frontend files
|
|
server {
|
|
listen 3000;
|
|
server_name _;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Gzip compression for faster load times
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/javascript image/svg+xml;
|
|
gzip_min_length 256;
|
|
|
|
# Cache static assets (JS/CSS hashed filenames)
|
|
location /assets/ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# SPA fallback — all non-file routes serve index.html
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|