Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

up vote 2 down vote accepted

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:


Hope this help

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.