server { listen 3087; server_name nova40.app www.nova40.app; # Ganti path ini sesuai lokasi folder dist di server root /var/www/nova40-landing/dist; index index.html; # Gzip compression gzip on; gzip_vary on; gzip_min_length 256; gzip_types text/plain text/css text/javascript application/javascript application/json image/svg+xml; # Cache static assets (hashed by Vite, safe to cache long) location /assets/ { expires 1y; add_header Cache-Control "public, immutable"; } # Cache images & icons location ~* \.(png|jpg|jpeg|gif|ico|svg)$ { expires 30d; add_header Cache-Control "public"; } # SPA fallback — semua route diarahkan ke index.html location / { try_files $uri $uri/ /index.html; } # Security headers add_header X-Frame-Options "SAMEORIGIN" always; add_header X-Content-Type-Options "nosniff" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; }