From 41deaa11e36a73a6064a5e1eb3a034634db7cbb3 Mon Sep 17 00:00:00 2001 From: T3tram <120490522+T3tram@users.noreply.github.com> Date: Tue, 13 Dec 2022 16:50:25 +0100 Subject: [PATCH] Update nginx.conf Try to get M$ oauth redirect url to work --- conf/nginx.conf | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index d9fdc4e..f6792a5 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -10,7 +10,15 @@ location __PATH__/ { #client_max_body_size 50M; try_files $uri $uri/ index.php; - location ~ [^/]\.php(/|$) { + + location ~ ^/api/(?!http.php/)(.*) { + try_files $uri $uri/ /api/http.php/$1; + } + location ~ ^/pages/(?!index.php/)(.*) { + try_files $uri $uri/ /pages/index.php/$1; + } + + location ~ ^(.*[^/]\.php)(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; @@ -24,3 +32,8 @@ location __PATH__/ { # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } + +location /include { + deny all; + return 403; +}