Rails中dispatch.fcgi文件的意义是什么
Rails环境中的public文件夹下有一个名为dispatch.fcgi
的文件。这个特定文件的意义是什么?
我打开了那个文件,里面有这个
# # Default log path, 50 requests between GC.
# RailsFCGIHandler.process! nil, 50
#
# # Custom log path, normal GC behavior.
# RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
#
require File.dirname(__FILE__) + "/../config/environment"
require 'fcgi_handler'
RailsFCGIHandler.process!
无法理解它的作用。有人可以解释一下吗?
There is a file under public folder in Rails environment called dispatch.fcgi
. What is the significance of this particular file?
I opened that file and it has this
# # Default log path, 50 requests between GC.
# RailsFCGIHandler.process! nil, 50
#
# # Custom log path, normal GC behavior.
# RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
#
require File.dirname(__FILE__) + "/../config/environment"
require 'fcgi_handler'
RailsFCGIHandler.process!
Cannot understand what this does. Can someone please explain?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
那一定是rails的旧版本,因为这个文件是在http服务器中使用fcgi启动rails应用程序的服务器的遗留物。
Apache 和 Nginx 现在通过乘客支持,或者您可以使用带有 mongrels 集群的代理,所有这些解决方案都不需要dispatch.fcgi。
https://serverfault.com/questions/60222/apache-dispatch- fcgi-不与乘客一起解释
That must be an old version of rails, because this file is a relic for servers which start the rails app with fcgi in your http server.
Apache and Nginx are now supported via passenger, or you can use a proxy with a mongrels cluster, all these solutions don't need a dispatch.fcgi.
https://serverfault.com/questions/60222/apache-dispatch-fcgi-doesnt-get-interpreted-with-passenger