[FASTCGI] Django + FastCGI problem

evilhare at yandex.ru evilhare at yandex.ru
Sat Dec 6 05:55:13 EST 2008


Hi, I am using Django + Apache (via FastCGI).
I've made my own 404 page (404.html in templates dir) and turned debug
mode off.
When I'm requesting for non-existed page I see my custom error page,
but in Apache's log there is something like this:
"GET /authors/333.html HTTP/1.1" 200 368 "-" (the return code is 200,
not 404).
Also I've tried custom error view (handler404 in urls.py):

from django.http import HttpResponse

def handler404(request):
    return HttpResponse('qqq', status=404)

I see 'qqq' when requesting for non-existed page, but there is still
200 code in logs, not 404.

Guy from the hosting support team told me:
" the problem here, is that the application is still returning something.
The web server still displays content from the dispatch.fcgi script (even
though it's nothing). The 404 comes from within your application, which
is still running and responding to apache.

 Unfortunately, there's nothing on our end that can be changed to fix
this."

But I need 404 error call to report about unexisted page to search bots.
Is it possible to fix it?


More information about the FastCGI-developers mailing list