Skip to content

Conversation

@tom76dc
Copy link

@tom76dc tom76dc commented Oct 12, 2016

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)

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)
@ravage84 ravage84 added this to the 3.x milestone Oct 12, 2016
@tenkoma
Copy link
Member

tenkoma commented May 4, 2017

Sorry, Nginx second config of the document had some problems, so I Improved it all together.

@markstory
Copy link
Member

Closing as @tenkoma has made the requested changes.

@markstory markstory closed this May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants