NGINX在发布到/

在向http://guy.lt/fbb?foo=bar发送post请求{username:'admin', password: 'password'}时发生此问题。 输出是{"foo":"bar"} ,虽然预期的输出是: {"foo":"bar","username":"admin","password":"password"} 。 (PHP后端输出JSON编码的$_REQUEST )但是,如果我直接发送POST请求到http://guy.lt/fbb/index.php?foo=bar ,我得到预期的输出。

所有相关的configuration:

 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不能POST到一个静态文件(url没有文件扩展名)

您需要通过代理自己将POST更改为GET。

请参阅我的解决scheme的相关组件的要点: https : //gist.github.com/1021739

更多信息可以在这里find:

http://article.gmane.org/gmane.comp.web.nginx.english/1941/match=post+405+static

希望这个帮助