如何在 IIS 上设置反向代理,允许 host1.mydomain.com 和 host2.mydomain.com 之间的跨主机通信? [英] How can I setup reverse proxy on IIS, allowing cross-host communciation between host1.mydomain.com and host2.mydomain.com?
问题描述
我在 host1.mydomain.com/page_from_host1.jsp 有一个页面,在 host2.mydomain.com/page_from_host2.html 有一个 HTML 页面.host1 是 IIS7/Tomcat 盒子,host2 是 IIS7 盒子.我想让第一页提交一个表单,显示第二页,并且URL不变.
I have a page at host1.mydomain.com/page_from_host1.jsp and an HTML page at host2.mydomain.com/page_from_host2.html. host1 is an IIS7/Tomcat box and host2 is an IIS7 box. I want to allow the first page to submit a form, which displays the second page, and the URL does not change.
即URL为host1.mydomain.com/page_rom_host2.jsp,但页面内容来自host2.mydomain.com/page_from_host2.html.
That is, the URL is host1.mydomain.com/page_rom_host2.jsp, but the contents of the page are from host2.mydomain.com/page_from_host2.html.
我想我可以在 IIS 上设置一个反向代理来完成此操作,类似于 mod_proxy,但 Apache Tomcat 服务器对所有这些都有些麻烦.如何设置反向代理以允许跨主机通信并屏蔽 URL?
I would imagine I can setup a reverse proxy on IIS to accomplish this, similar to mod_proxy, but the Apache Tomcat Server throws a bit of a wrench into all of this. How can I setup a reverse proxy to allow cross-host communication and mask the URL?
谢谢.
推荐答案
仅供参考,URL 似乎移动到了这里:
FYI the URL seemed to move here:
这是基本要点:
安装这两个东西:
- 应用请求路由
- 网址重写模块
配置应用请求路由"
- IIS 服务器节点 -> 应用请求路由缓存
- 服务器代理设置
- 勾选启用代理"
然后可以根据需要配置URL重写模块.
Then one can configure URL rewriting module as needed.
这篇关于如何在 IIS 上设置反向代理,允许 host1.mydomain.com 和 host2.mydomain.com 之间的跨主机通信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!