From a1606227961a0e544fda46e16c844bfdcdaa767e Mon Sep 17 00:00:00 2001 From: dr41nU <50152843+dr41nU@users.noreply.github.com> Date: Sun, 23 Feb 2020 19:29:22 +0100 Subject: [PATCH] Make it work for both root and subpath --- conf/nginx.conf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index c17a3a0..a05b09b 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,5 +1,6 @@ -location ^~ __PATH__ { - alias __FINALPATH__/public; +rewrite ^__PATH__$ __PATH__/ permanent; +location ^~ __PATH__/ { + alias __FINALPATH__/public/; index index.php; @@ -17,7 +18,7 @@ location ^~ __PATH__ { include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param SCRIPT_FILENAME $request_filename; } include conf.d/yunohost_panel.conf.inc;