server { listen 80; server_name localhost; root /usr/share/nginx/html; index index.html; location / { try_files $uri $uri/ =404; } location = / { try_files /index.html =404; } location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { expires max; add_header Cache-Control "public"; } }