The issue occurs when sending a post request {username:'admin', password: 'password'}
to http://guy.lt/fbb?foo=bar
. The output is {"foo":"bar"}
, though the expected output is: {"foo":"bar","username":"admin","password":"password"}
. (PHP backend outputs JSON encoded $_REQUEST
) However, if I send POST request directly to http://guy.lt/fbb/index.php?foo=bar
, I get the expected output.
All the relevant config:
https://gist.github.com/98f4e8fc56d1d2d706fd nginx.conf
https://gist.github.com/f9a60f3914696dca3374 anuary_standard_server
https://gist.github.com/6300bb66620d3731d776 virtualhosts.conf
https://gist.github.com/789ad2b0645cade2f9dc anuary_location_php
NginX cannot POST to a static file (url without a files extension)
You need to change the POST into a GET by proxying to self.
See this gist for relevant components of my solution: https://gist.github.com/1021739
More info may be found here:
http://article.gmane.org/gmane.comp.web.nginx.english/1941/match=post+405+static
Hope this help