混合 Ruby on Rails 和 ASP .Net
我通过 Google 搜索了 Internet,但找不到是否可以在同一台服务器上托管 ASP .Net 和 Ruby on Rails!
你知道这是否可能吗?
如果没有,我能做到这一点吗?
– www.abc.com – 重定向到页面 A(托管在 Ruby on Rails 服务器上)
– jobs.abc.com< /strong> 或 www.abc.com/jobs - 将用户重定向到 页面 B(托管在 ASP .Net 服务器上),
因此从用户处从角度来看,它们都在同一域名下并且看起来无缝?因此,jobs.abc.com 可能指向不同的 IP 地址。
以前有人这样做过吗?
谢谢大家。
I’ve scoured the Internet via Google and could not find if it is possible to host ASP .Net and Ruby on Rails on the same server!
Do you know if it is possible?
If not, would I be able to do this?
– www.abc.com – redirects to Page A (hosted on Ruby on Rails server)
– jobs.abc.com OR www.abc.com/jobs - redirects user to Page B (hosted on ASP .Net server)
So from the user point of view, they’re both under the same domain name and appear seamless? So perhaps jobs.abc.com points to a different IP address.
Has anyone done this before?
Thank you all.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,同一台物理计算机可以同时托管 RoR 和 ASP.NET。
合并不同平台上的两个应用程序并使它们看起来像一个无缝网站更具挑战性。一个不太好的选择是使用 IFRAME 在另一个网站 (A) 页面内呈现一个网站 (B),允许顶级 URL 仍然显示 A 的域等。
这听起来像是找到有关您正在尝试解决的问题的更多信息解决将是一个好主意,因为沿着这条路走下去可能会在未来造成混乱,并且应该尽可能避免。
您还可以像您建议的那样使用子域,以便域名相似但不完全相同。
您还需要考虑如何跨站点共享身份验证等。
Yes, the same physical computer can host RoR and ASP.NET at the same time.
To merge two apps on separate platforms and make them appear as one seamless site is a little more challenging. One not very nice option is to use IFRAMEs to render one site (B) inside another's (A) pages, allowing the top-level URL to still show A's domain, etc.
It sounds like finding out more about the issue you are trying to solve would be a good idea, as going down this road is likely to create a mess in the future, and should be avoided if at all possible.
You can also use sub-domains like you suggested, so that the domain names are similar but not exactly the same.
You will also need to consider how to share authentication, etc., across sites.
我猜你找不到支持这两种功能的主机。
我正在考虑类似的事情。似乎 Windows VPS 托管是可行的方法,然后我可以将 Ruby 安装到 IIS 作为 FastCGI 过滤器,甚至可以并排另一台服务器,但我不认为当两台服务器都需要侦听端口时,这可以完美地工作80(我猜是可行的,但可能令人不安)。
顺便说一句,对于 jobs.abc.com 场景,您不需要在同一服务器上安装这两个应用程序。您可以将它们放在两台服务器上并通过 DNS 管理差异。
You'll not find a host that supports both I guess.
I'm thinking of something similar. Seems a Windows VPS hosting is the way to go, and then I can install Ruby to IIS as FastCGI filter, or even have another server side by side but I don't expect this to work flawlessly when both servers will need to listen to port 80 (doable I guess, but probably troubling).
BTW, for the jobs.abc.com scenario you don't need the two apps on the same server. You can have them on two servers and manage the difference via DNS.