Search code examples
reverse-proxyiis-10

IIS-10 reverse proxy for BI internal server is not working


I am followin this tutorial but I think I am missing something

https://www.tevpro.com/blog/using-iis-as-a-reverse-proxy-server

I am trying to send request like

https://192.168.1.77/bi/Dashboards/Pretrial%20PSA%20Dashboard?rs:embed=true

this will send request like below link which works when we directly send request. https://192.168.1.77:9998/reports/powerbi/Dashboards/Pretrial%20PSA%20Dashboard?rs:embed=true

<rewrite>
        <rule name="IB Proxy" stopProcessing="true">
                <match url="/bi/(.*)" />
                <action type="Rewrite" url="https://192.168.1.77:9998/reports/powerbi/{R:1}" appendQueryString="false" />
            </rule>
        </rules>
    </rewrite>

Hi I am trying to set reverse proxy on test server but I think I am missing something as I am getting 404 error when I try to hit BI server.


Solution

  • Please try the rewrite rule below:

    <rewrite>
       <rules>
          <rule name="IB Proxy" stopProcessing="true">
             <match url="bi/(.*)" />
             <action type="Rewrite" url="https://192.168.1.77:9998/reports/powerbi/{R:1}" appendQueryString="true" />
          </rule>
       </rules>
    </rewrite>
    

    changes:

    <match url="/bi/(.*)" /> to <match url="bi/(.*)" />

    appendQueryString="false" to appendQueryString="true"

    • When set to true, the query string from the original URL will be appended to the replaced URL.

    In addition, you need to enable ARR on the IIS server.

    image1