如何在 mod_perl 虚拟主机中混合 Phusion Passenger?

发布于 2024-07-11 01:10:52 字数 592 浏览 6 评论 0原文

我有一个 VirtualHost,它将 Location / 的处理程序设置为 PerlModule 以部署催化剂应用程序。

我想将催化剂应用转变为轨道,但要逐步进行。 前端全部是使用 ExtJS 框架的 javascript,后端仅提供 JSON。 只要来自 Catalyst 和 Rails 的 JSON 格式相同,就可以逐步过渡。

理想情况下,我可以通过在同一域上托管 Rails 和 Catalyst,然后更新 AJAX 应用程序的各个部分以一次使用 Rails 而不是 Catalyst。

我需要将它们放在同一个域中,这样我就不必重新编码所有 AJAX 组件来使用脚本标记代理和 JSON 回调。

关于如何配置 phusion guest 与 mod_perl 一起使用的任何想法,它拥有位置 / 及其包含的所有内容,除非我指定另一个处理程序?

我尝试将 /rails 的默认处理程序设置为 default-handler 以绕过 mod_perl,然后使用 Passenger 的 RailsBaseURI /rails...但这显然不起作用。 您不能在位置标记中使用 RailsBaseURI。 我无法从乘客那里找到任何可以使用的处理程序。

I have a VirtualHost which sets the handler for Location / to a PerlModule to deploy a catalyst application.

I want to convert the catalyst application to rails, but gradually. The front end is all javascript using the ExtJS Framework, and the backend only serves JSON. This will allow for a gradual transition as long as the JSON is in the same format from catalyst and rails.

Ideally I would be able to do by hosting both rails and catalyst on the same domain, and then update the pieces of my AJAX application to use rails instead of catalyst one at a time.

I need to have them on the same domain so I don't have to recode all of the AJAX components to use a script tag proxy and JSON Callback.

Any ideas on how to configure phusion passenger to work with mod_perl, which owns the location / and everything it contains unless I specify another handler?

I tried setting the default handler for /rails to default-handler to bypass mod_perl, and then using Passenger's RailsBaseURI /rails... but this obviously doesn't work. You can't use RailsBaseURI in a Location tag. I wasn't able to find any handlers to use from passenger.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半岛未凉 2024-07-18 01:10:52

听起来您只需要一些简单的“别名”指令即可。

Alias /still/catalyst /path/to/the/catalyst_fastcgi.pl/

It sounds like some simple "Alias" directives are all you need.

Alias /still/catalyst /path/to/the/catalyst_fastcgi.pl/
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文