1
0
Fork 0
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:
Robles Rodolphe 2020-07-23 15:04:38 +02:00
parent e81141789f
commit c1816bc9f2

View file

@ -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__/ {