server { listen 80; server_name _; root /usr/share/nginx/html; index index.html; location / { try_files $uri $uri/ $uri.html =404; } location ~* \.(?:css|js|svg|png|jpg|jpeg|webp|ico|woff2?)$ { expires 7d; add_header Cache-Control "public, immutable"; try_files $uri =404; } }