sockets - 子域上的 Lighttpd 和 Redmine 给出 500 错误

标签 sockets redmine lighttpd

好的,我的 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/

相关文章:

Android UDP 点对点网络通信(无服务器)

sockets - golang tcp套接字在获取文件()后无法关闭

java - Java中如何获取 key 交换和认证协议(protocol)

ruby - 有没有办法检查 Ruby 中方法代码的内容,甚至修改它?

ssl - 如何使用 lighttpd 网络服务器限制 SSL 片段大小?

JAVA套接字——执行PJL命令

ruby-on-rails - 使用部署在 Heroku 上的 Redmine 和 Integrity 在 GitHub 上的私有(private)仓库上跟踪 Rails 项目

java - 用 redmine eclipse mylyn

php - HTML 不显示字符

linux - lighttpd 不使全局环境变量可用于可执行文件