lighttpd服务器cgi程序500
各位前辈,小弟前段时间移植的lighttpd服务器可以在浏览器正常显示html今天发现其无法正常运行cgi。
运行cgi时显示空白或者“500 - Internal Server Error”
cgi程序没有问题,在我移植的boa服务器上可以正常执行。请求大神帮助。
-----------------具体情况如下---------------------------
cgi程序存放路径:
/srv/www/cgi-bin/
cgi程序文件属性:
-rwxrwxrwx 1 lighttpd lighttpd 5248 Feb 8 07:38 hello
CGI源码如下:
include "conf.d/access_log.conf"
include "conf.d/debug.conf"
server.event-handler = "linux-sysepoll"
server.network-backend = "writev"
server.max-fds = 2048
server.stat-cache-engine = "simple"
server.max-connections = 1024
index-file.names += (
"index.xhtml", "index.html", "index.htm", "default.htm", "index.php"
url.access-deny = ( "~", ".inc" )
$HTTP["url"] =~ "\.pdf$" {
server.range-requests = "disable"
}
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" ,".cgi" )
include "conf.d/mime.conf"
include "conf.d/dirlisting.conf"
server.follow-symlink = "enable"
server.upload-dirs = ( "/var/tmp" )
#######################################################################
##
## CGI modules
## ---------------
##
## http://www.lighttpd.net/documentation/cgi.html
##
server.modules += ( "mod_cgi" )
##
## Plain old CGI handling
##
## For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini.
##
cgi.assign = ( ".pl" => "/usr/bin/perl",
".cgi" => "",
".rb" => "/usr/bin/ruby",
".erb" => "/usr/bin/eruby",
".py" => "/usr/bin/python" )
##
## to get the old cgi-bin behavior of apache
##
## Note: make sure that mod_alias is loaded if you uncomment the
## next line. (see modules.conf)
##
alias.url += ( "/cgi-bin" => server_root + "/cgi-bin" )
$HTTP["url"] =~ "^/cgi-bin" {
cgi.assign = ( "" => "" )
}
##
#######################################################################