Apache / nginx rewrite changes

This commit is contained in:
Taras Machyshyn
2019-09-27 16:18:50 +03:00
parent c02f39cf93
commit 3e83e97197
2 changed files with 4 additions and 17 deletions
+2 -6
View File
@@ -9,13 +9,9 @@ DirectoryIndex index.php index.html
# PROTECTED DIRECTORIES # PROTECTED DIRECTORIES
RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^/?(data|api|client)/ - [F] RewriteRule ^/?(api|client)/ - [F]
RewriteRule ^/?data/config\.php$ - [F] RewriteRule ^/?data/ - [F]
RewriteRule ^/?data/logs/ - [F]
RewriteRule ^/?data/cache/ - [F]
RewriteRule ^/?data/upload/ - [F]
RewriteRule ^/?data/\.backup/ - [F]
RewriteRule ^/?application/ - [F] RewriteRule ^/?application/ - [F]
RewriteRule ^/?custom/ - [F] RewriteRule ^/?custom/ - [F]
RewriteRule ^/?vendor/ - [F] RewriteRule ^/?vendor/ - [F]
+2 -11
View File
@@ -67,21 +67,12 @@ service apache2 restart',
try_files /reset.html =404; try_files /reset.html =404;
} }
location ^~ (data|api)/ { location ^~ (api|client)/ {
if (-e $request_filename){ if (-e $request_filename){
return 403; return 403;
} }
} }
location ^~ /data/logs/ { location ^~ /data/ {
deny all;
}
location ^~ /data/config.php {
deny all;
}
location ^~ /data/cache/ {
deny all;
}
location ^~ /data/upload/ {
deny all; deny all;
} }
location ^~ /application/ { location ^~ /application/ {