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/; }