IIS 8.5如何使用URL重写设置反向代理 [英] IIS 8.5 How to set up reverse proxy with URL Rewrite

查看:619
本文介绍了IIS 8.5如何使用URL重写设置反向代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让一个(公共)服务器A充当另一个(私有)服务器B的反向代理.服务器B对服务器A是可见的.即,如果我在服务器A上并且在浏览器中键入:

I am trying to get one (public) server A to act as a reverse proxy for another (private) server B. Server B is visible to server A. i.e. if I'm on server A and I type in a browser:

https://serverb.us/folder/application

我看到了申请表.我想要它,以便如果用户键入:

I see the application. I want it so that if the user types:

https://servera.us/folder/application

他看到服务器B上的Web应用程序.这可能吗?

he sees the web application that is on server B. Is that possible?

我尝试通过在IIS管理器中添加重写规则

I have tried adding a rewrite rule in IIS Manager by doing

URL重写>添加规则>反向代理>

URL Rewrite > Add Rule(s) > Reverse Proxy >

我将入站规则更改为完全匹配: https://servera.us/folder/application (忽略大小写)

I changed inbound rule to exact match: https://servera.us/folder/application (ignore case)

重写URL: https://serverb.us/folder/application (取消选中附加查询字符串) )

Rewrite URL: https://serverb.us/folder/application (uncheck append query string)

但是它什么也没做.我想念什么吗?

but it doesn't do anything. Am I missing something?

推荐答案

问题原来是身份验证.我必须确保两个应用程序在IIS管理器中具有相同的身份验证设置(在IIS管理器中单击Web应用程序或文件夹,然后双击身份验证")

The problem turned out to be Authentication. I had to make sure both applications had the same Authentication settings in IIS Manager (click on the web app or folder in IIS Manager then double-click Authentication)

这篇关于IIS 8.5如何使用URL重写设置反向代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆