You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
762 B

5 years ago
5 years ago
  1. #rewrite "^(.*)\.(\d{10})\.(css|js)$" $1.$3 break;
  2. location ~* \.(gif|svg|ico)$ {
  3. access_log off;
  4. expires max;
  5. log_not_found off;
  6. error_page 404 = /empty;
  7. }
  8. location ~* \.jpe?g$ {
  9. access_log off;
  10. expires max;
  11. log_not_found off;
  12. error_page 404 = /empty;
  13. }
  14. location ~* \.webp {
  15. access_log off;
  16. expires max;
  17. log_not_found off;
  18. error_page 404 = /empty;
  19. }
  20. location ~* \.png$ {
  21. access_log off;
  22. expires max;
  23. log_not_found off;
  24. error_page 404 = /empty;
  25. }
  26. location = /empty {
  27. expires 0;
  28. empty_gif;
  29. }
  30. location ~* \.(eot|ttf|woff|woff2|otf|pdf|css|js|mp4)$ {
  31. try_files $uri /404;
  32. access_log off;
  33. expires max;
  34. }
  35. location ~ /\. {
  36. deny all;
  37. }
  38. location ~* \.(tpl|ini|sh) {
  39. deny all;
  40. }