# Fwd: Fastcgi returning 404 and nginx overwriting it to 200

**URL:** <https://www.ruby-forum.com/t/fwd-fastcgi-returning-404-and-nginx-overwriting-it-to-200/236819>\
**Category:** NGINX\
**Created:** [October 5, 2013, 2:46pm UTC](https://www.ruby-forum.com/t/fwd-fastcgi-returning-404-and-nginx-overwriting-it-to-200/236819 "2013-10-05T14:46:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [October 5, 2013, 2:46pm UTC](https://www.ruby-forum.com/t/fwd-fastcgi-returning-404-and-nginx-overwriting-it-to-200/236819/1 "2013-10-05T14:46:47Z")

</div>

Hi all,

My version is 0.7.67-3 coming from Debian Squeeze.  
I have tried with squeeze-backports which is version 1.2.1-2.2~bpo60+2  
but  
I got the same results.

I have reduced this to the smallest config for fastcgi available and it  
still does the same.  
There are no intercept\_redirects directives or error\_pages neither.

I have tried enabling the debug log and I see messages like “upstream  
split  
a header line in FastCGI records”  
Strace-ing it later I see the first few lines sent, like the status one  
are  
splited in 2 recvfroms, but I assume this shouldn’t be a problem.  
I see clearly that nginx is receiving a 404 but sending back to the  
client  
the output intact but a 200 ok.

Am I doing/assuming something wrong in here or could this be a bug?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 5, 2013, 6:41pm UTC](https://www.ruby-forum.com/t/fwd-fastcgi-returning-404-and-nginx-overwriting-it-to-200/236819/2 "2013-10-05T18:41:10Z")

</div>

Hi,

I managed to fix it by changing uwsgi as fcgi runner from version 1.4.6  
to  
version 1.9.17.1, this fixed the issues, not sure what side was wrong.

–  
Arkaitz
