nginx.conf 605 B

1234567891011121314151617181920212223242526272829
  1. server {
  2. listen 80;
  3. server_name pc.mall4j.com;
  4. gzip on;
  5. gzip_static on;
  6. location / {
  7. try_files $uri $uri/ /;
  8. root /usr/share/nginx/html/dist;
  9. index index.html;
  10. if ($uri ~* .*\.(?:html)$){
  11. add_header Cache-Control "no-store, no-cache";
  12. }
  13. if ($uri ~* .*\.(?:css|js|png|jpg|jpeg|gif|gz|svg|mp4|ogg|ogv|webm|htc|xml|woff)$){
  14. expires 7d;
  15. }
  16. }
  17. error_page 404 /404.html;
  18. location = /404-light.html {
  19. }
  20. error_page 500 502 503 504 /50x.html;
  21. location = /50x.html {
  22. }
  23. }