错误:
[Fri Apr 17 22:40:32 2015] [warn] [client 1.52.63.23] (104) Connection reset by peer: mod_fcgid: 从 FastCGI 服务器读取数据时出错
[2015 年 4 月 17 日星期五 22:40:32] [错误] [客户端 1.52.63.23] 脚本头过早结束:dispatch.fcgi
谁能帮帮我吗?
@幸运的
代码调度.fcgi
#!/usr/bin/ruby
require File.dirname(__FILE__) + '/../config/boot'
require File.dirname(__FILE__) + '/../config/environment'
class Rack::PathInfoRewriter
def initialize(app)
@app = app
end
def call(env)
env.delete('SCRIPT_NAME')
parts = env['REQUEST_URI'].split('?')
env['PATH_INFO'] = parts[0]
env['QUERY_STRING'] = parts[1].to_s
@app.call(env)
end
end
Rack::Handler::FastCGI.run Rack::PathInfoRewriter.new(RedmineApp::Application)
代码 fcgid.conf
# This is the Apache server configuration file for providing FastCGI support
# through mod_fcgid
#
# Documentation is available at
# http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
LoadModule fcgid_module modules/mod_fcgid.so
# Use FastCGI to process .fcg .fcgi & .fpl scripts
AddHandler fcgid-script fcg fcgi fpl
# Sane place to put sockets and shared memory file
FcgidIPCDir /var/run/mod_fcgid
FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm
<IfModule mod_fcgid.c>
FcgidBusyTimeout 3600
FcgidMaxRequestLen 1073741824
FcgidProcessLifeTime 8200
FcgidIOTimeout 8200
FcgidConnectTimeout 300
</IfModule>