diff --git a/templates/nginx-maindomain.php b/templates/nginx-maindomain.php index 47691bd..d90af60 100644 --- a/templates/nginx-maindomain.php +++ b/templates/nginx-maindomain.php @@ -71,6 +71,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)(/.+)$; diff --git a/templates/nginx-nossl.php b/templates/nginx-nossl.php index 96f4c30..ca04a6b 100644 --- a/templates/nginx-nossl.php +++ b/templates/nginx-nossl.php @@ -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-e($user)?>.sock;