Skip to content

Instantly share code, notes, and snippets.

@natterstefan
Created November 1, 2021 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natterstefan/07448cb48987a7bfb7b958c53b3af79a to your computer and use it in GitHub Desktop.
Save natterstefan/07448cb48987a7bfb7b958c53b3af79a to your computer and use it in GitHub Desktop.
Plesk and nginx Caching
gzip on;
gzip_disable "MSIE [1-6]\\.(?!.*SV1)";
gzip_proxied any;
gzip_comp_level 5;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/rss+xml text/javascript image/x-icon image/bmp image/svg+xml;
gzip_vary on;
location ~* \.(js|jpg|jpeg|gif|png|webp|css|tgz|gz|rar|bz2|doc|pdf|ppt|tar|wav|bmp|rtf|swf|ico|flv|txt|woff|woff2|svg)$ {
etag on;
if_modified_since exact;
add_header Pragma "public";
# 7 days
add_header Cache-Control "max-age=604800, public";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment