From 1b2ef562c5c56e7c98f1895888d0860e3613a60d Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 31 May 2022 23:25:54 +0200 Subject: [PATCH] Fix NGINX conf --- conf/nginx.conf | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index a62e2f0..37869dd 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,20 +9,14 @@ 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/ @rewrite; + # Bug in Nginx with locations and aliases (see http://stackoverflow.com/a/35102259 ) + try_files $uri $uri/ __PATH__/__PATH__/index.php$is_args$args; - location ~ [^/]\.php(/|$) { - fastcgi_split_path_info ^(.+?\.php)(/.*)$; + location ~* \.php$ { fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_index index.php; include fastcgi_params; - fastcgi_param REMOTE_USER $remote_user; - fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $request_filename; } } - -location @rewrite { - rewrite ^/(.+)$ __PATH__/index.php?page=$1 last; -}