django url matching with Lighttpd fastcgi
Posted
by
7seb
on Server Fault
See other posts from Server Fault
or by 7seb
Published on 2011-11-19T00:29:25Z
Indexed on
2011/11/19
1:54 UTC
Read the original article
Hit count: 574
I have a problem with url. I can access the djando app home page ( localhost/djangotest/ ) but can't access the admin section ( localhost/djangotest/admin/ ). I can access it using the django server instead of lighttpd.
Lighttp conf :
fastcgi.server = (
"/djangotest/" => (
"main" => (
"host" => "127.0.0.1",
"port" => 3033,
"check-local" => "disable",
)
),
)
url.rewrite-once = (
"^(/media.*)$" => "$1",
"^/favicon\.ico$" => "/media/favicon.ico",
"^/djangotest/[^?](.*)$" => "/djangotest/?$1",
)
The django url.py is just : (i just uncommented the good lines) :
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
)
I tried many things but without success ... (no need to link to https://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/ )
lighttpd/1.4.28 Python 2.7.2+ Django 1.3.0
© Server Fault or respective owner