wrong status code when proxying 404 errors

Jodok Batlogg batlogg at mac.com
Thu Feb 7 23:23:10 MSK 2008


hi,

i'm trying to use an upstream proxy to generate a 404 error page.
my config looks like that:


  location '/error/404' {
      rewrite ^/(.*) /news/404  break;
      proxy_pass http://backend_varnish;
  }

      error_page 404 = /error/404;


unfortunately nginx returns a response header of 200 OK

i also tried

error_page 404 =404 /error/404;

but that doesn't work as well.
any ideas?

thanks

jodok






More information about the nginx mailing list