From adde6141b12d5729892f0cd8e214256feb39f7c4 Mon Sep 17 00:00:00 2001 From: Kayou Date: Mon, 3 Jun 2019 17:44:21 +0200 Subject: [PATCH] Update nginx.conf --- conf/nginx.conf | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 1e7c3ac..8bcd0eb 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - root __FINALPATH__/ ; + alias __FINALPATH__/ ; # Force usage of https if ($scheme = http) { @@ -14,7 +14,13 @@ 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?$query_string; + location /yunohost/sso/ { + try_files $uri $uri/ index.php; + } + location / { + try_files $uri $uri/ @prettynoemiecms; + } + location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock; @@ -31,6 +37,10 @@ location __PATH__/ { include conf.d/yunohost_panel.conf.inc; } +location @prettynoemiecms { + rewrite /(.*)$ /index.php?/$1 last; +} + location __PATH__/medias/ { alias __FINALPATH__/sites/$host/medias/; }