From afda58febf31078debd9c119dbc75f01a55d207c Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 7 Sep 2023 00:21:56 +0300 Subject: [PATCH] fix(nginx) : no web access to private folder --- conf/nginx.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index 1707f33..dcb3639 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -10,6 +10,13 @@ location __PATH__/ { client_max_body_size 500M; try_files $uri $uri/ index.php; + + # private folder for YesWiki + location ~* /(.*/)?private/ { + deny all; + return 403; + } + location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;