Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The issue occurs when sending a post request {username:'admin', password: 'password'} to 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, I get the expected output.

All the relevant config: nginx.conf anuary_standard_server virtualhosts.conf anuary_location_php
share|improve this question
up vote 3 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:

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.