Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. root /var/www/html/;
  2.  
  3. # Add index.php to the list if you are using PHP
  4. index index.html index.htm index.nginx-debian.html;
  5.  
  6. server_name _;
  7.  
  8.  
  9. location ~ ([^\/]+)(?=\/.\.js$|\.js$){
  10. try_files $uri $uri/ /ui/$1.js;
  11. }
  12.  
  13. location ~ ([^\/]+)(?=\/.\.svg$|\.svg$){
  14. try_files $uri $uri/ /ui/$1.svg;
  15. }
  16.  
  17. location ~ ([^\/]+)(?=\/.\.eot$|\.eot$){
  18. try_files $uri $uri/ /ui/$1.eot;
  19. }
  20.  
  21. location ~ ([^\/]+)(?=\/.\.ico$|\.ico$){
  22. try_files $uri $uri/ /ui/$1.ico;
  23. }
  24.  
  25. location ~ ([^\/]+)(?=\/.\.woff2$|\.woff2$){
  26. try_files $uri $uri/ /ui/$1.woff2;
  27. }
  28.  
  29. location ~ ([^\/]+)(?=\/.\.ttf$|\.ttf$){
  30. try_files $uri $uri/ /ui/$1.ttf;
  31. }
  32.  
  33. location ~ ([^\/]+)(?=\/.\.woff$|\.woff$){
  34. try_files $uri $uri/ /ui/$1.woff;
  35. }
  36.  
  37. location ~ ([^\/]+)(?=\/.\.map$|\.map$){
  38. try_files $uri $uri/ /ui/$1.map;
  39. }
  40.  
  41. location ~ assets(.*) {
  42. try_files $uri $uri/ /ui/assets/$1;
  43. }
  44.  
  45.  
  46. location ~ ^/ui {
  47. # First attempt to serve request as file, then
  48. # as directory, then fall back to displaying a 404.
  49. expires -1;
  50. add_header Pragma "no-cache";
  51. add_header Cache-Control "no-store, no-cache, must-revalicate, post-check=0 pre-check=0";
  52. try_files $uri $uri/ /ui/index.html;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement