Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root /var/www/html/;
- # Add index.php to the list if you are using PHP
- index index.html index.htm index.nginx-debian.html;
- server_name _;
- location ~ ([^\/]+)(?=\/.\.js$|\.js$){
- try_files $uri $uri/ /ui/$1.js;
- }
- location ~ ([^\/]+)(?=\/.\.svg$|\.svg$){
- try_files $uri $uri/ /ui/$1.svg;
- }
- location ~ ([^\/]+)(?=\/.\.eot$|\.eot$){
- try_files $uri $uri/ /ui/$1.eot;
- }
- location ~ ([^\/]+)(?=\/.\.ico$|\.ico$){
- try_files $uri $uri/ /ui/$1.ico;
- }
- location ~ ([^\/]+)(?=\/.\.woff2$|\.woff2$){
- try_files $uri $uri/ /ui/$1.woff2;
- }
- location ~ ([^\/]+)(?=\/.\.ttf$|\.ttf$){
- try_files $uri $uri/ /ui/$1.ttf;
- }
- location ~ ([^\/]+)(?=\/.\.woff$|\.woff$){
- try_files $uri $uri/ /ui/$1.woff;
- }
- location ~ ([^\/]+)(?=\/.\.map$|\.map$){
- try_files $uri $uri/ /ui/$1.map;
- }
- location ~ assets(.*) {
- try_files $uri $uri/ /ui/assets/$1;
- }
- location ~ ^/ui {
- # First attempt to serve request as file, then
- # as directory, then fall back to displaying a 404.
- expires -1;
- add_header Pragma "no-cache";
- add_header Cache-Control "no-store, no-cache, must-revalicate, post-check=0 pre-check=0";
- try_files $uri $uri/ /ui/index.html;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement