apache - 如何在不使用 URL 重定向的情况下将向 Apache 服务器发出的请求传输到 IIS 服务器?

标签 apache iis iis-7 redirect apache2

我的 Apache 2.2.9 在 Debian Lenny 5.0.1 上运行,有 2 个网络接口(interface),一个接口(interface)有公共(public) IP 和主机名,另一个没有配置。这台机器迎合在 LAMP 堆栈上运行的服务。

有一台运行 IIS 7 的 Windows Server 2008 SP2 机器可以满足我们的 ASP.net 需求。该盒子可以配置为在本地或公共(public) IP 上,并且还具有 2 个网络接口(interface)。

两台服务器都通过 SSL 提供服务,而 Apache 是面向公众的。

有没有办法当一个请求如https://foo.com/contentfromiis/使浏览器可以提供来自 IIS 服务器的内容,而无需使用重定向并转移到 https://bar.com/iwastransferedhere/。 .换句话说,用户不得/体验/发生任何切换。谢谢!

最佳答案

如果我正确理解您的情况,我相信您可以使用 mod_proxy做你想做的事。基本上,Apache 将充当您实际希望从 IIS 提供服务的请求的“反向代理”。请注意,反向代理与普通的 HTTP 代理不同。来自 mod_proxy 文档:

A reverse proxy ... appears to the client just like an ordinary web server. No special configuration on the client is necessary. The client makes ordinary requests for content in the name-space of the reverse proxy. The reverse proxy then decides where to send those requests, and returns the content as if it was itself the origin.

关于apache - 如何在不使用 URL 重定向的情况下将向 Apache 服务器发出的请求传输到 IIS 服务器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/959016/

相关文章:

apache - 如何告诉 Apache 忽略/阻止 404 错误并重定向到处理页面?

java - NetBeans 7.0.1 : Access to Tomcat server has not been authorized

ruby-on-rails - 如何使用 apache2 和 apache tomcat 服务器部署 rails 应用程序

c# - 使用 asp.net 和状态服务器在两个网站之间共享 session

c# - 如何在 .NET Core 中重定向对程序集的探测?

asp.net - 如何将单页应用程序/静态 html 网站的 ASP.NET 表单例份验证与 Web api 服务结合起来

asp.net - session 状态超时与空闲超时

Apache Tomcat 7 - war 文件不部署

c# - 缓存通过脚本提供的图像

iis-7 - 同一个IP的443端口中的多个域