Advertisement
Guest User

Untitled

a guest
Apr 21st, 2017
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.27 KB | None | 0 0
  1.     # prepare for letsencrypt
  2.     # https://community.centminmod.com/posts/17774/
  3.     location ~ /.well-known {
  4.         location ~ /.well-known/acme-challenge/(.*) {
  5.                 more_set_headers    "Content-Type: text/plain";
  6.         }
  7.     }
  8.  
  9.     location ~* \.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$ {
  10.         gzip_static off;
  11.         #add_header Pragma public;
  12.         add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  13.         access_log off;
  14.         expires 30d;
  15.         break;
  16.         }
  17.  
  18.     location ~* \.(js)$ {
  19.         #add_header Pragma public;
  20.         add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  21.         access_log off;
  22.         expires 30d;
  23.         break;
  24.         }
  25.  
  26.     location ~* \.(css)$ {
  27.         #add_header Pragma public;
  28.         add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  29.         access_log off;
  30.         expires 30d;
  31.         break;
  32.         }
  33.  
  34.     location ~* \.(html|htm|txt)$ {
  35.         #add_header Pragma public;
  36.         add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  37.         access_log off;
  38.         expires 1d;
  39.         break;
  40.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement