nginx.conf 357 B

123456789101112131415161718
  1. server {
  2. listen 80;
  3. root /usr/share/nginx/html;
  4. index index.html;
  5. location / {
  6. try_files $uri $uri/ /index.html;
  7. }
  8. location ~* \.(js|css|png|jpg|jpeg|gif|svg|ico|woff|woff2|ttf|eot|otf|mp4|webm|ogg|mp3|wav|m4a|json|txt|xml)$ {
  9. expires 1y;
  10. access_log off;
  11. add_header Cache-Control "public";
  12. }
  13. error_page 404 /index.html;
  14. }