From 960cf6e0c099b21a8685c57393b5c0d9e644453d Mon Sep 17 00:00:00 2001 From: Boudewijn Date: Sun, 2 Mar 2025 19:14:28 +0100 Subject: [PATCH] move rewrite rule to inside (outer) location instead of in php location --- conf/nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 9325dd3..548c7e2 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,5 +1,7 @@ location / { alias __INSTALL_DIR__/public/; + # try redirecting stuff to index.php + rewrite ^(.*)$ /index.php$1 last; index index.php; client_max_body_size 256M; @@ -8,8 +10,6 @@ location / { try_files $uri $uri/ /index.php?$query_string; location ~ [^/]\.php(/|$) { - # try redirecting stuff to index.php - rewrite ^(.*)$ /index.php$1 last; fastcgi_split_path_info ^(.+\.php)(/.+)$; #fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm-__APP__.sock; fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm.sock;