feat(nginx) : protect private folder

This commit is contained in:
Florian Schmitt 2023-06-17 13:43:57 +03:00
parent 01cc5712bd
commit d9c9096d8c
2 changed files with 12 additions and 0 deletions

View file

@ -71,6 +71,12 @@ server {
<?php endif ?>
try_files $uri $uri/ /index.php$is_args$args;
}
# private folder for YesWiki
location ~* /(.*/)?private/ {
deny all;
return 403;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;

View file

@ -33,6 +33,12 @@ server {
try_files $uri $uri/ /index.php$is_args$args;
}
# private folder for YesWiki
location ~* /(.*/)?private/ {
deny all;
return 403;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm-<?=$this->e($user)?>.sock;