Create wpcommon-php71.conf

This commit is contained in:
VirtuBox 2018-03-22 14:50:00 +01:00 committed by GitHub
parent 1cd0b37aa6
commit d171738495
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,33 @@
# WordPress COMMON SETTINGS
# DO NOT MODIFY, ALL CHANGES LOST AFTER UPDATE EasyEngine (ee)
# Limit access to avoid brute force attack
location = /wp-login.php {
limit_req zone=one burst=1 nodelay;
include fastcgi_params;
fastcgi_pass php71;
}
# Disable wp-config.txt
location = /wp-config.txt {
deny all;
access_log off;
log_not_found off;
}
# Disallow php in upload folder
location /wp-content/uploads/ {
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;
}
}
location ~* ^/wp-content/.+\.(png|jpg)$ {
add_header Vary Accept;
add_header "Access-Control-Allow-Origin" "*";
access_log off;
log_not_found off;
expires 30d;
try_files $uri$webp_suffix $uri =404;
}
location ~ \/wp-admin\/load-(scripts|styles).php {
deny all;
}