用IIS配置反向代理
https://natapp.cn/
http://blog.csdn.net/g2321514568/article/details/12406755
?
目標服務器:targetServer
配置反向代理的服務器:reveseProxServer
1、確定最終訪問的網址:比如www.baidu.com ?、www.csdn.net等等。
? ? 當然你也可以自己在targetServer部署自己的程序,在此為了示范,我在targetServer上部署了2個,用的8088端口,程序分別是:
? ??http://targetServer:8088/Auditsys/Default.htm
? ??http://targetServer:8088/GCustomer/Login.htm
? ? 如圖:
? ? ? ? ?
2、下面的操作均在在reveseProxServer上執行。
3、安裝IIS。
4、安裝ARR,下載地址(http://www.iis.net/downloads/microsoft/application-request-routing)
5、新建一個網站:(我的示例YIWeb,端口是8080) ? http://reveseProxServer:8080
? ??
5、啟用Proxy
?
? ??
6、添加URL重寫規則
? ?
?
然后添加一個空白規則:
保存這個規則,ok了!
7、試試效果
?
8、總結:
? ? 上面的?^(.*) 、?^192.168.3.73:8080$ 、http://targetserver:8088/{R:1}
? ? 表示:用192.168.3.73:8080替換http://targetserver:8088/,
? ? ? ? ? ? {R:1}就表示^(.*),意思是“http://targetserver:8088/”后面匹配任何字符
? ? ? ? ? ? eg:訪問192.168.3.73:8080/test/index.htm
? ? ? ? ? ? ? ? 這個url就被重寫成了http://targetserver:8088/test/index.htm
轉載于:https://www.cnblogs.com/shiningrise/p/5520524.html
總結
以上是生活随笔為你收集整理的用IIS配置反向代理的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: android 4.2刷机包,纽曼 K1
- 下一篇: 2018 年视频监控企业竞争力分析 海康