Hi guys,
I meet the HTTP 404 error when django is running on fast-cgi
mode with
lighttpd.
I wrote following view in my demo django app:
def index(request, txt):
return HttpResponse(txt)
And the urls.py was as following:
urlpatterns = patterns('',
(r'^(.*)$', 'framework.views.index'),
)
The small app runs without exception when using the built-in
standalone
server:
'python ./manage.py runserver 8080'
But I get HTTP 404 errors when I run it through lighttpd.
The
lighttpd configuration for fast-cgi is
fastcgi.server += (
"/dewes" => (
"dewes" => (
"socket" =>
"/tmp/django.sock",
"check-local" =>
"disable",
"max-procs" => 1,
)
)
)
And I activate the fast-cgi processes by
'python ./manage.py runfcgi socket=/tmp/django.sock
daemonize=false'
I get HTTP 404 errors when the request url is like
'http://hostname:po
rt/dewes/dirname'
And the url displayed in firefox is automatically changed to
'http://hostname:port/dir
name' every time I meet this problem.
the dirname was any string didn't contain '.' character.
The curious thing is when I appended a '/' character to the
request url,
like 'http://hostname:p
ort/dewes/dirname/', everything is ok.
I don't understand where is the problem from? lighttpd or
django?
I am running trac on fast-cgi mode in the same lighttpd, and
the trac runs
well.
It there any body can help me?!
Thanks a lot!
Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-users googlegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|