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.

34 lines
650 B

4 years ago
4 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 ~* \.png$ {
  15. access_log off;
  16. expires max;
  17. log_not_found off;
  18. error_page 404 = /empty;
  19. }
  20. location = /empty {
  21. expires 0;
  22. empty_gif;
  23. }
  24. location ~* \.(eot|ttf|woff|woff2|otf|pdf|css|js|mp4)$ {
  25. try_files $uri /404;
  26. access_log off;
  27. expires max;
  28. }
  29. location ~ /\. {
  30. deny all;
  31. }
  32. location ~* \.(tpl|ini|sh) {
  33. deny all;
  34. }