From 150095074b50a59fd623b40da75c8526147777e3 Mon Sep 17 00:00:00 2001 From: Serversonic <62808385+serversonic@users.noreply.github.com> Date: Fri, 11 Aug 2023 12:03:52 +0100 Subject: [PATCH] Update nginx.conf Move ^/api location stanza out of root location --- conf/nginx.conf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 2d8e196..d5ce364 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,11 +9,7 @@ location __PATH__/ { # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file client_max_body_size 256M; - try_files $uri $uri/ index.php; - - location ~ ^/api/(?!http.php/)(.*) { - try_files $uri $uri/ /api/http.php/$1; - } + try_files $uri $uri/ index.php location ~ ^/pages/(?!index.php/)(.*) { try_files $uri $uri/ /pages/index.php/$1; @@ -34,6 +30,10 @@ location __PATH__/ { include conf.d/yunohost_panel.conf.inc; } +location ~ ^/api/(?!http.php/)(.*) { + try_files $uri $uri/ /api/http.php/$1; +} + location /include { deny all; return 403;