我正在尝试让我的应用程序在InstantRails 1.0上运行。该应用程序使用WeBrick工作正常,但当我尝试在InstantRails中使用Apache运行它时,我得到:
[Wed May 26 12:26:53 2010] [error] [client 127.0.0.1] couldn't spawn child process: c:/instantrails-1.0/rails_apps/guest/public/dispatch.cgi
在apache错误日志中,我的浏览器显示:
Application error
Rails application failed to start properly"
InstantRails附带的cookbook应用程序运行正常。
我的apache配置看起来像:
<VirtualHost *>
ServerName guest.havelick.com
# handle all requests through SCGI
SCGIMount /dispatch.fcgi 127.0.0.1:9999
DocumentRoot ${path}/rails_apps/guest/public
<Directory ${path}/rails_apps/guest/public>
Options +FollowSymLinks
Order allow,deny
allow from all
</Directory>
AddDefaultCharset utf-8
ErrorDocument 500 /500.html
ErrorDocument 404 /404.html
</VirtualHost>
和SCGI端口匹配我在InstantRails配置中使用的端口。
我该怎么做才能解决这个问题?
答案 0 :(得分:0)
我想出来了。默认的.htaccess文件包含:
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
InstantRails期望:
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]