好的,我的 CentOS6 VPS 和 Lighttpd 工作得很好。我安装了Redmine,让它在Webrick 上运行。当我杀死 Webrick 并尝试使用 fastcgi 在 Lighttpd 上托管 Redmine 时,我收到的唯一消息是 500。我的 PHP 应用程序工作正常。
每次我尝试访问我的 redmine 时,我都会在日志文件中收到以下两条消息:
(mod_fastcgi.c.2543) unexpected end-of-file (perhaps the fastcgi process died): pid: 8490 socket: unix:/tmp/redmine.socket-0
(mod_fastcgi.c.3329) response not received, request sent: 597 on socket: unix:/tmp/redmine.socket-0 for /dispatch.fcgi?, closing connection
/tmp/是可写的,lighttpd用户拥有所有redmine文件,我的lighttpd.conf文件如下:
$HTTP["host"] =~ "redmine.domain.com" {
server.document-root = "/path/to/redmine/public"
server.errorlog = "/path/to/redmine/log/lighttpd.log"
accesslog.filename = "/path/to/redmine/log/access.log"
magnet.attract-physical-path-to = ( "/path/to/redmine/tmp/cleanurl.lua" )
fastcgi.server = ( "dispatch.fcgi" =>
((
"socket" => "/tmp/lighttpd/redmine.socket",
"bin-path" => "/usr/bin/ruby /path/to/redmine/public/dispatch.fcgi",
"max-procs" => 1,
"idle-timeout" => 20,
"kill-signal" => 9,
"bin-environment" => (
"RAILS_ENV" => "production",
"TARGET" => "/path/to/redmine/public/dispatch.fcgi"
)
))
)
}
Lighttpd 重新启动正常,没有错误。
当然,/path/to/redmine 指向我实际的 redmine 文件夹。
软件版本:
CentOS 6 x64
Lighttpd 1.4.31
Ruby 1.8.7
Rails 3.2.6
最佳答案
终于可以工作了。我只需要向我的dispatch.fcgi 文件添加两个要求,如下所示:
require 'rubygems'
require 'fcgi'
提示:他们必须转到文件顶部,就在其他人需要之前。
/主题已关闭。
关于sockets - 子域上的 Lighttpd 和 Redmine 给出 500 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11909820/