iis - 如何使用 IIS 作为代理设置 Apache NiFi
问题描述
我在 Windows 服务器上运行 Apache NiFi。我已经设置了 HTTPS 访问并通过 LDAP 将其连接到我的 AD 以进行用户身份验证。属性的值是nifi.web.https.host
6444 ,我可以通过https://localhost:6444/nifi访问 Web UI ,没有任何问题。localhost
nifi.web.https.port
我现在想将 NiFi 设置为在同一台服务器上的 IIS 后面运行,以便 IIS 充当代理。我在 IIS 中创建了一个新站点,并在其 web.config 文件中配置了 URL 重写规则,如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="Redirect to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
</rule>
<rule name="NiFi Reverse Proxy" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="https://localhost:6444/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
IIS 和 NiFi 都使用我组织的相同 SSL 证书。
我已将文件中的nifi.web.proxy.host
属性配置为.nifi.properties
nifi01.myorg.com:443
我可以从外部计算机访问https://nifi01.myorg.com/nifi 。我看到登录页面并且能够成功登录。但是,授权完成后,我被重定向到https://localhost:6444/nifi。如果在同一个浏览器会话中我输入https://nifi01.myorg.com/nifi,那么我可以看到主要的 Nifi 工作流 UI,它告诉我登录过程确实有效。
有人可以帮助我重定向到https://localhost:6444/nifi 吗?web.config 或 nifi.properties 文件中是否缺少某些内容?
我发现这篇文章https://community.hortonworks.com/articles/113240/running-apache-nifi-behind-a-proxy-2.html因为不知道在 IIS 中的位置而无法关注设置应该去。
解决方案
推荐阅读
- python - 搜索插入位置
- momentjs - 如何根据 Moment.js 中的周数和年份获取一周的第一个日期?
- reactjs - RefetchQueries 未正确更新存储
- javascript - 无法打印 getDay() 方法的结果
- docker - 无法使用 traefik 获取正确的容器 IP
- node.js - 为什么升级feathersjs后我收到错误:MethodNotAllowed
- jquery - ajax数据表的水平滚动条
- laravel - Laravel - Composer 更新和托管 azure 问题
- windows - 将带有参数的 bat(启动 cmd 窗口并将命令添加到路径)包含在另一个 bat 中
- c# - HTML 到图像 - 垂直文本