Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I want my server proxy Google if my $request_body of a POSTed request contains the string google, e.g.

echo "google" | lwp-request -m POST ""

So I have the config like, e.g.

server {
  listen default;

  location / {
        if ($request_body ~* .*google.*) {

But the result of the above config is always "404 Not Found"

Any idea? Thanks.

share|improve this question
Are you sure it is your nginx that returns the 404, and not the proxied request? – pkhamre Sep 17 '12 at 13:13
@pkhamre, the 404 is returned from nginx, I can see the at the footer <hr><center>nginx/1.1.19</center> – Ryan Sep 17 '12 at 14:36

Your Answer


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

Browse other questions tagged or ask your own question.