mirror of
https://github.com/YunoHost-Apps/garradin_ynh.git
synced 2024-09-03 18:36:17 +02:00
add redirect proctected urls
This commit is contained in:
parent
38e34bd3a4
commit
0e87e6cfce
1 changed files with 11 additions and 1 deletions
|
@ -8,11 +8,21 @@ location __PATH__ {
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
try_files $uri $uri/ index.php /_route.php;
|
try_files $uri $uri/ index.php /_route.php;
|
||||||
index index.php /_route.php;
|
index index.php /_route.php;
|
||||||
|
|
||||||
location ~ [^/]\.php(/|$) {
|
location ~ [^/]\.php(/|$) {
|
||||||
try_files $uri $uri/ /_route.php;
|
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
|
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
|
|
Loading…
Reference in a new issue