mirror of
https://github.com/joglomedia/LEMPer.git
synced 2026-04-11 23:48:19 +00:00
update nginx restriction rules
This commit is contained in:
@@ -65,7 +65,7 @@ location ~* /(.*)\.(?:markdown|md|twig|yaml|yml|ini|log)$ {
|
||||
}
|
||||
|
||||
# Deny access to all packages manager file, such as grunt or composer file.
|
||||
location ~* (Gruntfile|package|composer)\.(js|json)$ {
|
||||
location ~* (Gruntfile|package|composer)\.(js|json|lock)$ {
|
||||
deny all;
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
@@ -81,24 +81,24 @@ location ~* /(?:uploads|files)/.*\.php$ {
|
||||
}
|
||||
|
||||
# Deny access to PHP file in site files directory.
|
||||
location ~ ^/sites/.*/private/ {
|
||||
location ~* ^/sites/.*/private/ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~* ^/sites/[^/]+/files/.*\.php$ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
# Deny access to WordPress-related stuff.
|
||||
location ~ (license|readme)\.(html|txt)$ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ wp-config.php {
|
||||
deny all;
|
||||
}
|
||||
location ~ readme.html {
|
||||
deny all;
|
||||
}
|
||||
location ~ readme.txt {
|
||||
deny all;
|
||||
}
|
||||
location ~* ^/wp-content/backup-db/ {
|
||||
|
||||
location ~ ^/wp-content/backup-db/ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user