Created
November 1, 2021 09:58
-
-
Save natterstefan/07448cb48987a7bfb7b958c53b3af79a to your computer and use it in GitHub Desktop.
Plesk and nginx Caching
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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