我的 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/