My config is as below , when start the lighttpd can see threads of django.fcgi .
But when try to visit the website , the page is always in loading and
never show anything . Meanwhile , no error in the log file .
Use the "manage runserver" can show the website correctly.
The django in svn lastest edition.
Who can help me to find the problem . Thanks .
django.fcgi
_____________________________________________
#!/usr/bin/python
import sys, os
PROJECT_PATH='/home/www/django/website'
#sys.path.insert(0, PROJECT_PATH)
os.chdir(PROJECT_PATH)
os.environ['DJANGO_SETTINGS_MODULE'] = "settings"
from django.core.servers.fastcgi import runfastcgi
runfastcgi(
method="prefork",
daemonize='false',
socket="/var/run/lighttpd/lighttpd-django.sock",
#host="127.0.0.1",
#port=9001,
)
________________________________________________
/etc/lighttpd/lighttpd.conf
_______________________________________________
var.basedir = "/home/www/"
var.logdir = "/var/log/lighttpd"
var.statedir = "/var/lib/lighttpd"
server.modules = (
"mod_rewrite",
"mod_alias",
"mod_access",
"mod_fastcgi",
"mod_accesslog"
)
include "mime-types.conf"
fastcgi.server = (
".php" =>
((
"socket"=>"/var/run/lighttpd/lighttpd-fastcgi-php-" + PID +
".socket",
"bin-path" => "/usr/bin/php-cgi",
"min-procs" => 8,
"max-procs" => 20,
"idle-timeout" => 20
)),
"/django.fcgi" =>
("main" =>(
#"host" => "127.0.0.1",
#"port" => 9001,
"check-local" => "disable",
"socket" =>
"/var/run/lighttpd/lighttpd-django.sock",
"bin-path" => var.basedir + "django.fcgi",
))
)
server.username = "stuhome"
server.groupname = "lighttpd"
server.document-root = var.basedir
server.pid-file = "/var/run/lighttpd.pid"
server.errorlog = var.logdir + "/error.log"
server.follow-symlink = "enable"
server.event-handler = "linux-sysepoll"
server.port = 80
static-file.exclude-extensions = (".php", ".pl", ".py", ".cgi", ".fcgi")
alias.url = (
"/admin_media/css/" => var.basedir + "django/admin_css/",
"/admin_media/" => var.basedir + "django/sdk/django/contrib/admin/media/",
"/file/" => var.basedir + "django/website/file/",
)
url.rewrite-once = (
"^(/.*)$" => "/django.fcgi$1",
)
$HTTP["url"] =~ "^/bbs/" {
accesslog.filename = "|/usr/sbin/cronolog " + var.logdir +
"/bbs/access_log.%Y%m%d"
}
$HTTP["url"] !~ "^/bbs/" {
accesslog.filename = "|/usr/sbin/cronolog " + var.logdir +
"/other/access_log.%Y%m%d"
}
dir-listing.activate = "disable"
--
博客:http://zsp.javaeye.com/
专业:生物医学工程+计算机科学与技术
技能:C++(STL,BOOST) Python(Django) HTML+CSS AJAX
-- 张沈鹏
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---