diff --git a/conf/nginx.conf b/conf/nginx.conf index d89e30e..66184a3 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - alias __FINALPATH__/public/; + alias __FINALPATH__/public/ ; # Force usage of https if ($scheme = http) { @@ -10,12 +10,16 @@ location __PATH__/ { } index index.php; + if (!-e $request_filename) + { + rewrite ^__PATH__/(.+)$ __PATH__/index.php?q=$1 last; + } # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file #client_max_body_size 50M; - try_files $uri $uri/ @firefly; - location ~ \.php { + try_files $uri $uri/ index.php; + location ~ '[^/]\.php$|^/update.php' { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; @@ -30,7 +34,6 @@ location __PATH__/ { include conf.d/yunohost_panel.conf.inc; } -location @firefly { - # rewrite all to index.php - rewrite ^(.*)$ __PATH__/index.php/$1 last; +location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; }