mirror of
https://github.com/YunoHost-Apps/garradin_ynh.git
synced 2024-09-03 18:36:17 +02:00
protect sensibles urls
This commit is contained in:
parent
e81141789f
commit
c1816bc9f2
1 changed files with 12 additions and 0 deletions
|
@ -6,6 +6,18 @@ alias __FINALPATH__/www/ ;
|
|||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
# Protecting sensibles urls
|
||||
location ~ 403 {
|
||||
rewrite ^(.*)$ /include/ redirect;
|
||||
rewrite ^(.*)$ /cache/ redirect;
|
||||
rewrite ^(.*)$ /plugins/ redirect;
|
||||
rewrite ^(.*)$ /templates/ redirect;
|
||||
rewrite ^(.*)$ /.*.sqlite redirect;
|
||||
rewrite ^(.*)$ /.*.log redirect;
|
||||
rewrite ^(.*)$ /(README|VERSION|COPYING) redirect;
|
||||
rewrite ^(.*)$ /config\.(.*)\.php redirect;
|
||||
}
|
||||
|
||||
# Example PHP configuration (remove if not used)
|
||||
location __PATH__/ {
|
||||
|
|
Loading…
Reference in a new issue