源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

用IIS配置反向代理实现方法(图文)

  • 时间:2021-02-01 04:15 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:用IIS配置反向代理实现方法(图文)
目标服务器:targetServer 配置反向代理的服务器:reveseProxServer iis应该是iis7及以上版本,才可以。 1、确定最终访问的网址:比如www.baidu.com  、www.1sucai.cn等等。     当然你也可以自己在targetServer部署自己的程序,在此为了示范,我在targetServer上部署了2个,用的8088端口,程序分别是:     http://targetServer:8088/Auditsys/Default.htm     http://targetServer:8088/GCustomer/Login.htm     如图:          [img]http://files.jb51.net/file_images/article/201511/201511052259411.png[/img] 2、下面的操作均在在reveseProxServer上执行。 3、安装IIS。 4、安装ARR,下载地址([url=http://www.iis.net/downloads/microsoft/application-request-routing]http://www.iis.net/downloads/microsoft/application-request-routing[/url]) 5、新建一个网站:(我的示例YIWeb,端口是8080)   http://reveseProxServer:8080     [img]http://files.jb51.net/file_images/article/201511/201511052259412.png[/img] 5、启用Proxy [img]http://files.jb51.net/file_images/article/201511/201511052259413.png[/img] [img]http://files.jb51.net/file_images/article/201511/201511052259414.png[/img]      [img]http://files.jb51.net/file_images/article/201511/201511052259425.png[/img] 6、添加URL重写规则    [img]http://files.jb51.net/file_images/article/201511/201511052259426.png[/img] 然后添加一个空白规则: [img]http://files.jb51.net/file_images/article/201511/201511052259427.png[/img] [img]http://files.jb51.net/file_images/article/201511/201511052259428.png[/img] [img]http://files.jb51.net/file_images/article/201511/201511052259429.png[/img] 保存这个规则,ok了! 7、试试效果 [img]http://files.jb51.net/file_images/article/201511/2015110522594210.png[/img] [img]http://files.jb51.net/file_images/article/201511/2015110522594211.png[/img] 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
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部