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.

46 lines
2.3 KiB

5 years ago
5 years ago
5 years ago
5 years ago
  1. location / {
  2. rewrite ^/.*$ /index.php last;
  3. }
  4. location ~ ^/combine.*\.(css|js) {
  5. rewrite ^/.*$ /index.php last;
  6. expires max;
  7. }
  8. # Whitelist
  9. ## Let October handle if static file not exists
  10. location = /favicon.ico { try_files $uri /index.php; }
  11. location ~ ^/.*\.xml { try_files $uri /index.php; }
  12. location = /robots.txt { try_files $uri /index.php; }
  13. location = /humans.txt { try_files $uri /index.php; }
  14. ## Let nginx return 404 if static file not exists
  15. location /storage/app/uploads/public { try_files $uri /404; }
  16. location /storage/app/media { try_files $uri /404; }
  17. location /storage/app/yml { try_files $uri /404; }
  18. location /storage/app/resized { try_files $uri /404; }
  19. location /storage/temp/public { try_files $uri /404; }
  20. location ~ ^/modules/.*/assets { try_files $uri /404; }
  21. location ~ ^/modules/.*/resources { try_files $uri /404; }
  22. location ~ ^/modules/.*/behaviors/.*/assets { try_files $uri /404; }
  23. location ~ ^/modules/.*/behaviors/.*/resources { try_files $uri /404; }
  24. location ~ ^/modules/.*/widgets/.*/assets { try_files $uri /404; }
  25. location ~ ^/modules/.*/widgets/.*/resources { try_files $uri /404; }
  26. location ~ ^/modules/.*/formwidgets/.*/assets { try_files $uri /404; }
  27. location ~ ^/modules/.*/formwidgets/.*/resources { try_files $uri /404; }
  28. location ~ ^/modules/.*/reportwidgets/.*/assets { try_files $uri /404; }
  29. location ~ ^/modules/.*/reportwidgets/.*/resources { try_files $uri /404; }
  30. location ~ ^/plugins/.*/.*/assets { try_files $uri /404; }
  31. location ~ ^/plugins/.*/.*/resources { try_files $uri /404; }
  32. location ~ ^/plugins/.*/.*/behaviors/.*/assets { try_files $uri /404; }
  33. location ~ ^/plugins/.*/.*/behaviors/.*/resources { try_files $uri /404; }
  34. location ~ ^/plugins/.*/.*/reportwidgets/.*/assets { try_files $uri /404; }
  35. location ~ ^/plugins/.*/.*/reportwidgets/.*/resources { try_files $uri /404; }
  36. location ~ ^/plugins/.*/.*/formwidgets/.*/assets { try_files $uri /404; }
  37. location ~ ^/plugins/.*/.*/formwidgets/.*/resources { try_files $uri /404; }
  38. location ~ ^/plugins/.*/.*/widgets/.*/assets { try_files $uri /404; }
  39. location ~ ^/plugins/.*/.*/widgets/.*/resources { try_files $uri /404; }
  40. location ~ ^/themes/.*/resources { try_files $uri /404; }