From 4505fbc2cd5867c1dba64fabdbddbc5714f4d856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 6 Oct 2023 21:46:56 +0200 Subject: [PATCH] Update nginx.conf --- conf/nginx.conf | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index e51cbbd..9ca9db2 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -7,13 +7,14 @@ location __PATH__/ { index index.php /_route.php; # Increase size limit - client_max_body_size 50M; + client_max_body_size 2M; - #try_files $uri $uri/ __PATH__/__PATH__/_route.php?$query_string; - try_files $uri $uri/ __PATH__/_route.php?$query_string; - - location ~ [^/]\.php(/|$) { - fastcgi_split_path_info ^(.+?\.php)(/.*)$; + try_files $uri $uri/ __PATH__/__PATH__/_route.php?$query_string; + location ~ \.php$ { + if (!-e $request_filename) { + rewrite ^__PATH__/?(.*)$ __PATH__/_route.php?/$1 last; + break; + } fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_index index.php;