从我们的服务器在另一个域上运行网站

发布于 2024-10-01 00:41:01 字数 505 浏览 8 评论 0原文

我们将在 Windows 服务器上开发一个 ASP.NET 应用程序,并希望在另一个公司的域名 http://notourdomain 上运行。 com。该域当前所在的服务器是 Resin,其语言是 Java(TM) SE 运行时环境

实现这一点的最佳方法是什么?

我们需要我们的应用程序在“notourdomain.com/app/”上运行,

所以如果在我们的服务器上它是“ourserver.com/app/dir1/page/”或“ourserver.com/dir1/page/”

在他们的域上将显示为“notourdomain.com/app/dir/page/”

他们建议使用负载平衡进行 URL 重定向,以便内容看起来是从“notourdomain.com”提供的

您是否有任何其他建议或具体信息这会被设置吗?正面、负面、评论等?

感谢您提供有关此问题的任何信息。

we are going to develop an asp.net application on our windows server that we want to run on another companies domain name, http://notourdomain.com. The server which the domain is currently on is Resin and their language is Java(TM) SE Runtime Environment

What is the best way to make this happen?

We would need our application to run on "notourdomain.com/app/"

so if on our server it was "ourserver.com/app/dir1/page/" or "ourserver.com/dir1/page/"

on their domain it would show as "notourdomain.com/app/dir/page/"

They suggested to do the URL redirecting using their load balancing so the content appears to be serving up from "notourdomain.com"

Do you have any other suggestions or specifics on how this would be set up? Positives, negatives, comments, etc?

Thank you for any information you can give on this.

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

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

发布评论

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

评论(2

一身骄傲 2024-10-08 00:41:01

我建议创建一个子域,这可能是两个应用程序之间发生 url 冲突的可能性很小的选项。

所以它会是这样的:

http://yourappname.notourdomain.com

I would suggest create a subdomain, this might be the option that would have minor chance of url conflicting between the two apps.

So it will be something like this:

http://yourappname.notourdomain.com

只想待在家 2024-10-08 00:41:01

如果您愿意重定向到 http://ourserver.com/app/*(而不是透明地使用 notourdomain.com 域)并且负载均衡器支持然后一定要让他们的负载均衡器重定向到您的网站。

但是,如果您不希望主机名因重定向而发生更改,请继续阅读:

首先,如果他们的负载均衡器可以代理(而不是重定向)到您的服务器的请求,那么这将是一个好方法。

他们是否在 Resin 前面运行 HTTP 服务器(例如 Apache、nginx)?如果是这样,许多流行的 HTTP 服务器都支持代理。 HTTP 服务器可以配置为将 /app/* 的所有请求代理到 http://ourserver.com/app/*

如果他们没有运行 HTTP 服务器,而 Resin 是响应每个 HTTP 请求的前线服务器,那么我对 Resin 不熟悉,所以我无法给出具体细节。但您应该研究一下 Resin 是否可以配置为代理某些请求。如果没有,那么也许您可以创建在 Resin 中运行并响应 /app/* 请求的 servlet。该 servlet 的唯一工作是充当代理,连接到 ourserver.com 以检索适当的页面并将结果传递给客户端。这是最不理想的解决方案。

If you're cool with a redirect to http://ourserver.com/app/* (rather than transparently using the notourdomain.com domain) and the load balancer supports it, then by all means have their load balancer redirect to your website.

However, if you don't want the hostname to change at all due to a redirect, read on:

First, if their load balancer can proxy (not redirect) requests to your server, then that would be a good method.

Are they running a HTTP server in front of Resin (e.g., Apache, nginx)? If so, many popular HTTP servers support proxying. The HTTP server can be configured to proxy all requests for /app/* to http://ourserver.com/app/*.

If they're not running a HTTP server, and Resin is the front line server responding to every HTTP request, then I'm not familiar with Resin so I can't give specifics. But you should look into whether Resin can be configured to proxy certain requests. If not, then perhaps you can create servlet that runs in Resin and responds to /app/* requests. This servlet's only job is to act as a proxy, connecting to ourserver.com to retrieve the appropriate page and pass the result on to the client. This is the least ideal solution.

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