server { listen 80; root /usr/share/nginx/html; index index.html; gzip on; gzip_types text/css application/javascript image/svg+xml application/xml; location /assets/ { add_header Cache-Control "public, max-age=604800, stale-while-revalidate=86400"; } location / { try_files $uri $uri/index.html =404; } error_page 404 /404.html; }