From f799a9adf67f12cd6d6ebefe84c9b86eafd8947e Mon Sep 17 00:00:00 2001 From: Kayou Date: Mon, 3 Jun 2019 17:06:26 +0200 Subject: [PATCH] Fix admin panel nginx conf --- conf/nginx.conf | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 222077f..1e7c3ac 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - alias __FINALPATH__/ ; + root __FINALPATH__/ ; # Force usage of https if ($scheme = http) { @@ -14,7 +14,7 @@ location __PATH__/ { # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file client_max_body_size 50M; - try_files $uri $uri/ index.php; + try_files $uri $uri/ /index.php?$query_string; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock; @@ -27,21 +27,10 @@ location __PATH__/ { fastcgi_param SCRIPT_FILENAME $request_filename; } - location ~ ^__PATH__/(.*)$ { - if ($request_filename !~ "-l"){ - set $rule_1 1$rule_1; - } - if (!-f $request_filename){ - set $rule_1 2$rule_1; - } - if (!-d $request_filename){ - set $rule_1 3$rule_1; - } - if ($rule_1 = "321"){ - rewrite __PATH__/(.*) __PATH__/index.php?$1 last; - } - } - # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } + +location __PATH__/medias/ { + alias __FINALPATH__/sites/$host/medias/; +}