From a7a26181edd44dfe16744c48c97e597353ac837c Mon Sep 17 00:00:00 2001 From: tom76dc Date: Wed, 12 Oct 2016 14:03:16 +0200 Subject: [PATCH] Nginx configuration adjustment I had cakephp3 on a apache machine. I installed nginx on another machine, and followed the nginx rewriting documentation from the 3.0 cookbook. I copied my app to the new machine The rewriting looks ok . Unfortunatly, pagination was always broken. For example, when i visit the URL customers?page=2 and debug this with debugkit..... I see that i loose the request parameters after question mark '?'. On Apache Query string = page 2 On Nginx Query string = when i change the nginx configuration, in the location block, in the line try_files , by adding "?$uri" this solves the issue for me In the nginx page https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/ below title Front Controller Pattern Web Apps , it has a simular configration My machine has : PHP version 7 nginx version: nginx/1.10.0 (Ubuntu) --- en/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/installation.rst b/en/installation.rst index e2df3bca34..4a65711414 100644 --- a/en/installation.rst +++ b/en/installation.rst @@ -469,7 +469,7 @@ addition to www.example.com consult the nginx link above): error_log /var/www/example.com/log/error.log; location / { - try_files $uri /index.php?$args; + try_files $uri /index.php?$uri&$args; } location ~ \.php$ {