首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CGI >

lighttpd服务器cgi程序500,该怎么处理

2012-12-14 
lighttpd服务器cgi程序500各位前辈,小弟前段时间移植的lighttpd服务器可以在浏览器正常显示html今天发现其

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.conf文件内容如下:
#######################################################################
##
##  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 = ( "" => "" )
}

##
#######################################################################

lighttpd在arm开发板上的移植过程是:
http://blog.csdn.net/alan00000/article/details/7192607
[解决办法]
大部分时间网页显示的是一片空白,偶尔才显示“500 - Internal Server Error”

热点排行