Skip to main content

配置IIS反向代理教程

· One min read
Alan

假设将域名www.helloworld.com代理到本地的8080端口

准备工作

设置

设置前:

https://gitee.com/alanway/resources/raw/master/files/iis-reverse-proxy/IIS-Proxy-Tutorial-0.png

开启ARR代理:

https://gitee.com/alanway/resources/raw/master/files/iis-reverse-proxy/IIS-Proxy-Tutorial-1.pnghttps://gitee.com/alanway/resources/raw/master/files/iis-reverse-proxy/IIS-Proxy-Tutorial-2.pnghttps://gitee.com/alanway/resources/raw/master/files/iis-reverse-proxy/IIS-Proxy-Tutorial-3.png

新建一个站点helloworld(站点名称随意), 并绑定域名www.helloworld.com:

https://gitee.com/alanway/resources/raw/master/files/iis-reverse-proxy/IIS-Proxy-Tutorial-4.png

配置helloworld站点的URL Rewrite:

https://gitee.com/alanway/resources/raw/master/files/iis-reverse-proxy/IIS-Proxy-Tutorial-5.pnghttps://gitee.com/alanway/resources/raw/master/files/iis-reverse-proxy/IIS-Proxy-Tutorial-6.pnghttps://gitee.com/alanway/resources/raw/master/files/iis-reverse-proxy/IIS-Proxy-Tutorial-7.pnghttps://gitee.com/alanway/resources/raw/master/files/iis-reverse-proxy/IIS-Proxy-Tutorial-8.png

配置完成之后访问 www.helloworld.com 实际上访问的是IIS的站点helloworld, 然后IIS会将请求路由到127.0.0.1:8080, 看到的效果如下:

https://gitee.com/alanway/resources/raw/master/files/iis-reverse-proxy/IIS-Proxy-Tutorial-9.png