Update templates

This commit is contained in:
VirtuBox
2019-08-08 08:40:03 +02:00
parent c2641d02cf
commit d1f51f345d
7 changed files with 80 additions and 24 deletions

View File

@@ -56,6 +56,20 @@ location /wp-content/plugins/ewww-image-optimizer/images {
deny all;
}
}
# enable gzip on static assets - php files are forbidden
location /wp-content/cache {
# Cache css & js files
location ~* \.(?:css(\.map)?|js(\.map)?|.html)$ {
add_header "Access-Control-Allow-Origin" "*";
access_log off;
log_not_found off;
expires 30d;
}
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;
}
}
# Deny access to any files with a .php extension in the uploads directory
# Works in sub-directory installs and also in multisite network
# Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)