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

View File

@@ -9,13 +9,9 @@ DirectoryIndex index.php index.html
# PROTECTED DIRECTORIES
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^/?(data|api|client)/ - [F]
RewriteRule ^/?(api|client)/ - [F]
RewriteRule ^/?data/config\.php$ - [F]
RewriteRule ^/?data/logs/ - [F]
RewriteRule ^/?data/cache/ - [F]
RewriteRule ^/?data/upload/ - [F]
RewriteRule ^/?data/\.backup/ - [F]
RewriteRule ^/?data/ - [F]
RewriteRule ^/?application/ - [F]
RewriteRule ^/?custom/ - [F]
RewriteRule ^/?vendor/ - [F]

View File

@@ -67,21 +67,12 @@ service apache2 restart',
try_files /reset.html =404;
}
location ^~ (data|api)/ {
location ^~ (api|client)/ {
if (-e $request_filename){
return 403;
}
}
location ^~ /data/logs/ {
deny all;
}
location ^~ /data/config.php {
deny all;
}
location ^~ /data/cache/ {
deny all;
}
location ^~ /data/upload/ {
location ^~ /data/ {
deny all;
}
location ^~ /application/ {