wrong status code when proxying 404 errors

Denis F. Latypoff denis at gostats.ru
Fri Feb 8 09:41:39 MSK 2008


Hello Jodok,

Friday, February 8, 2008, 2:23:10 AM, you wrote:

> hi,

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


-   location '/error/404' {
+   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



-- 
Best regards,
 Denis                            mailto:denis at gostats.ru






More information about the nginx mailing list