IIS ARR反向代理

先在Server Proxy Setting中修改:
去掉
    Reverse rewrite host in reponse headers
    Include TCP port from client IP

Preserve client IP in the following header
修改为
Src-IP

Forwarding proxy header value
修改为
ARR

关掉缓存

保留Host命令:
"C:\Windows\System32\inetsrv\appcmd.exe" set config -section:system.webServer/proxy /preserveHostHeader:"True" /commit:apphost
(因域名未备案从国外转回的域名不能用)

处理301、302跳转问题:
添加出站规则
【前提条件】为{RESPONSE_STATUS}为301或302
【匹配】范围为服务器变量,变量名称为:RESPONSE_LOCATION
模式为【.*】,不含括号

【条件】中
条件输入为{RESPONSE_LOCATION}
模式匹配为【(.*)://(.*):8099(.*)】,不含括号,端口根据实际情况定
操作属性的值为【http://{HTTP_HOST}{C:3}】,钩上替换现有服务器变量值
                      
Copyright © 2018-2023 个人文章分享 cygpc.com All Rights Reserved. 备案号: 桂ICP备18011954号-1