# ────────────────────────────────────────────── # Nur Falah — Estate & Waqf Suite · Nginx SPA Config # Target: moslem04.falahos.my # ────────────────────────────────────────────── server { listen 80; listen [::]:80; server_name moslem04.falahos.my; root /usr/share/nginx/html; index index.html; error_page 404 =200 /index.html; gzip on; gzip_vary on; gzip_proxied any; gzip_comp_level 5; gzip_min_length 512; gzip_types text/html text/plain text/css text/javascript application/javascript application/json application/manifest+json image/svg+xml image/x-icon font/woff2; add_header X-Frame-Options "SAMEORIGIN" always; add_header X-Content-Type-Options "nosniff" always; add_header X-XSS-Protection "0" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; location / { try_files $uri $uri/ /index.html; add_header Cache-Control "no-cache, must-revalidate" always; } location /assets/ { expires 1y; add_header Cache-Control "public, immutable, max-age=31536000" always; access_log off; } location = /favicon.svg { expires 7d; add_header Cache-Control "public, max-age=604800" always; access_log off; } location = /manifest.webmanifest { expires 1d; add_header Cache-Control "public, max-age=86400" always; add_header Content-Type "application/manifest+json"; } location /sw.js { add_header Cache-Control "no-cache, no-store, must-revalidate" always; add_header Service-Worker-Allowed "/"; expires off; access_log off; } location ~* \.(js|css|woff2)$ { expires 1y; add_header Cache-Control "public, immutable, max-age=31536000" always; } location ~* \.(png|ico)$ { expires 1y; add_header Cache-Control "public, immutable, max-age=31536000" always; access_log off; } location ~ /\. { deny all; access_log off; log_not_found off; } location ~ ^/(node_modules|src)/ { deny all; access_log off; } }