配置nginx plus以使用ssrs(和ntlm)作为反向代理

问题描述 投票:0回答:1

我正在尝试使用nginx plus服务器作为在单独机器上运行的ssrs实例的反向代理。 Nginx托管在Linux(Ubuntu)服务器上; ssrs(当然)在Windows服务器上。直接访问ssrs(不通过反向代理)工作正常。

我的问题是如何在这种情况下正确配置Nginx Plus。这是我的nginx配置文件的相关部分:

upstream reports_backend {
    server a.b.c.d:443;
    ntlm;
}

server {
    ...
    location /Reports {
        rewrite ^/Reports/(.*)? /Reports/$1 break;
        proxy_http_version 1.1;
        proxy_set_header Connection "";
        proxy_set_header Host a.b.c.d;
        proxy_pass https://reports_backend/Reports;
    }

    ...
}

这确实连接到服务器a.b.c.d(而不是它的真实名称)上的ssrs,我可以在ssrs Web门户中导航报告文件夹就好了。单击报告时出现问题。 URI从“Reports”更改为“ReportServer”,这使我从Nginx获得404(未找到)。

我已尝试放入与上述类似定义的其他位置:

location /ReportServer {
    rewrite ^/ReportServer/(.*)? /ReportServer/$1 break;
    proxy_http_version 1.1;
    proxy_set_header Connection "";
    proxy_set_header Host a.b.c.d;
    proxy_pass https://reports_backend/ReportServer;
}

此方法的问题在于它在跟踪/ ReportServer代理传递时建立新连接,该传递不包含来自/ Reports连接的NTLM身份验证信息。

我已经尝试将/ Reports和/ ReportServer端点放在一个位置,这没有用(我无法让重写工作正常)。

有任何想法吗?

nginx reporting-services nginx-reverse-proxy ntlm-authentication
1个回答
0
投票

好吧,经过几天拔头发后,我终于开始工作了。原来它不是NGINX设置,它是SSRS设置。在rsreportserver.config中,我必须具有以下设置(类似于自定义身份验证):

<Authentication>
    <AuthenticationTypes>
        <RSWindowsNTLM/>
    </AuthenticationTypes>
    <RSWindowsExtendedProtectionLevel>Off</RSWindowsExtendedProtectionLevel>
    <RSWindowsExtendedProtectionScenario>Proxy</RSWindowsExtendedProtectionScenario>
    <EnableAuthPersistence>true</EnableAuthPersistence>
</Authentication>

对我来说关键是将RSWindowsExtendedProtectionLevel设置为Off,现在一切正常。

© www.soinside.com 2019 - 2024. All rights reserved.