From a3edfbecc886e1ce4b2deb7e59963d8f4e6b78e4 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Thu, 26 Sep 2019 22:19:41 +0200 Subject: [PATCH] fix nginx rewrite --- conf/nginx.conf | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 9dea88f..14ad113 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,18 +2,18 @@ location __PATH__/ { # Path to source - alias __FINALPATH__/ ; + alias __FINALPATH__/webroot/ ; if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } - index index.php; + index index.html index.php; # Common parameter to increase upload size limit in conjuction with dedicated php-fpm file #client_max_body_size 50M; - try_files $uri $uri/ index.php; + try_files $uri $uri/ @galette; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php7.1-fpm-__NAME__.sock; @@ -28,3 +28,7 @@ location __PATH__/ { # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } + +location @galette { + rewrite ^(.*)$ __PATH__/index.php last; +}