Advertisement
Guest User

Untitled

a guest
Jan 18th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.85 KB | None | 0 0
  1. server {
  2.     listen       80;
  3.     listen     8080;
  4.     server_name  _;
  5.  
  6.     root /usr/share/nginx/html;
  7.  
  8.     add_header Last-Modified $date_gmt;
  9.     add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
  10.     if_modified_since off;
  11.     expires off;
  12.     etag off;
  13.  
  14.     try_files $uri $uri/ @index;
  15.  
  16.     location @index {
  17.         add_header Last-Modified $date_gmt;
  18.         add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
  19.         if_modified_since off;
  20.         expires off;
  21.         etag off;
  22.         try_files /index.html =404;
  23.     }
  24.  
  25.     location ~* .*\.(?:css|js)$ {
  26.         try_files $uri =404;
  27.         expires 1y;
  28.         access_log off;
  29.         add_header Cache-Control "public";
  30.     }
  31.  
  32.     location ~ .+\..+$ {
  33.         try_files $uri =404;
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement