通过 Passenger 后面的 Ruby Web 应用程序执行 CGI
我有一个 Rack 应用程序(称为 Rails、Sinatra 等)通过 Passenger 运行,并使用 nginx 作为前端服务器。我目前正在另一个地方通过 CGI 运行化石 scm 和多个存储库。
我想融合这两个向 Ruby 应用程序发出请求的应用程序,以便该应用程序可以对化石执行 CGI 请求,并获取结果,添加/修改/分析任何内容,然后将其发送给客户端。
正常的化石操作可以通过命令行完成我没有问题。但要显示门票/维基/等的内容。我需要通过 CGI 运行它,但我不希望每个存储库都有 CGI 文件。
我认为它可以/应该通过将 ENV 从机架传递给它并获取响应来使用 Ruby CGI lib 来完成,但我不太确定如何做。
I have a Rack app (call it Rails, Sinatra, etc.) running through Passenger with nginx as front server. I'm currently running on another place fossil-scm via CGI with multiple repos.
I want to fuse those two making a request to the Ruby app so that the app can do the CGI request to fossil, and obtain the result back, add/modify/analyze whatever, and send it to the client.
Normal fossil operations that can be done through the command line I have no problem. But to display the content of the tickets/wiki/etc. I need to run it through CGI but I don't want having CGI files for each repo lying around.
I think it can/should be done with Ruby CGI lib by passing the ENV from rack to it and obtaining the response, but I'm not really sure how to.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论