lighttpd 分段错误

lighttpd 分段错误

大家好,我搞不懂,当我将 fastcgi 模块添加到 lighttpd 并尝试连接到 php 页面时,出现了分段错误。错误日志中没有任何内容,崩溃时也没有打印任何其他内容。这似乎只是 php 页面的问题;如果我连接到 html 页面,并且 fastcgi 模块处于打开状态,服务器不会崩溃。此外,Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error.当我连接到 php 页面时,会出现一个。

conf 文件。

lighttpd配置文件

var.log_root    = "/var/log/lighttpd"
var.server_root = "/var/www"
var.state_dir   = "/var/run"
var.home_dir    = "/var/lib/lighttpd"
var.conf_dir    = "/etc/lighttpd"

var.vhosts_dir  = server_root + "/vhosts"

var.cache_dir   = "/var/cache/lighttpd"

var.socket_dir  = home_dir + "/sockets"

include "modules.conf"

server.port = 80

server.username  = "lighttpd"
server.groupname = "lighttpd"

server.pid-file = state_dir + "/lighttpd.pid"

server.errorlog = log_root + "/error.log"

include "conf.d/access_log.conf"

include "conf.d/debug.conf"

server.event-handler = "poll"

server.network-backend = "linux-sendfile"

server.max-fds = 2048

server.stat-cache-engine = "simple"

server.max-connections = 150

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" )

include "conf.d/mime.conf"

include "conf.d/dirlisting.conf"

server.follow-symlink = "enable"

server.upload-dirs = ( "/var/tmp" )

模块配置文件

server.modules = (
  "mod_access",
  #"mod_fastcgi" #Not needed, referenced in /conf.d/fastcgi.conf
)
include "conf.d/fastcgi.conf"

conf.d/fastcgi.conf

server.modules += ( "mod_fastcgi" )

fastcgi.server = ( ".php" => (( 
                     "bin-path" => "/usr/bin/php-cgi",
                     "socket" => "/tmp/php-fastcgi.socket" 
                   ))
                 )

谢谢,马克斯

答案1

根据您的评论,您可能最终将自定义安装中的 mod_fastcgi.so 与从存储库安装的 lighttpd 版本混合在一起。由于版本不匹配,当您尝试使用它时它会崩溃。理想情况下,您会完全卸载之前的 lighttpd 尝试,但现在,运行find / -name mod_fastcgi.so并删除它找到的所有内容。然后,重新安装lighttpd-fastcgi软件包以安装真正应该存在的文件,并使用正确的版本。

相关内容