nginx config enhancements

This commit is contained in:
joglomedia
2019-08-29 22:14:27 +07:00
parent 2228882a6d
commit 86d4a3f30a
2 changed files with 6 additions and 1 deletions

View File

@@ -68,10 +68,10 @@ if ($cookie_woocommerce_items_in_cart = "1") {
set $skip_cache 1;
}
## Purging FastCGI cache.
location ~ /purge(/.*) {
access_log off;
log_not_found off;
fastcgi_cache_purge FASTCGICACHE "$scheme$request_method$host$request_uri";
return 301 $scheme://$server_name;
allow 127.0.0.1;

View File

@@ -76,9 +76,14 @@ location ~* ^/wp-content/backup-db/ {
# Deny access to scripts in site files directory.
location ~ ^/sites/.*/private/ {
deny all;
access_log off;
log_not_found off;
}
location ~ ^/sites/[^/]+/files/.*\.php$ {
deny all;
access_log off;
log_not_found off;
}
# Deny access to "hidden" files and directories whose names begin with a