Question: ARR Reverse Proxy Setup

(from github.com/zaryk)
I have ARR setup in IIS under an web application with a virtual directory called “FTS”. This way, all traffic for Fess should go through FTS. E.g. Selecting a filesystem index from the list, gets redirected to to https://test.site.gov/admin. This should start with https://test.site.gov/fts/admin. I can manually modify the url to go to the expected path.

Do you have any thoughts on this or suggestions?

The below configuration is what I am using.

  1. Rewrite CSS/JS/Images/Links to include a base address

  2. Change logout urls to append /fts to beginning. This is because logout would redirect to https://test.site.gov/logout

  3. Change login urls to append /fts to beginning. This is because logout would redirect to https://test.site.gov/login

  4. Change admin urls to append /fts to beginning. This because on login it would redirect to https://test.site.gov/admin

  5. Reverse proxy from localhost:8080 to new address

EDIT:-------------------
Updated with data-href for admin. Requires UrlRewrite 2.1

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <outboundRules>
                <clear />

		<rule name="ChangeAdmin">
                    <match serverVariable="RESPONSE_LOCATION" pattern="/admin(.*)" />
                    <action type="Rewrite" value="/fts{R:0}" />
                </rule>
		<rule name="ChangeLogout">
                    <match serverVariable="RESPONSE_LOCATION" pattern="/logout(.*)" />
                    <action type="Rewrite" value="/fts{R:0}" />
                </rule>
		<rule name="ChangeLogin">
                    <match serverVariable="RESPONSE_LOCATION" pattern="/login(.*)" />
                    <action type="Rewrite" value="/fts{R:0}" />
                </rule>
		<rule name="ChangeGo">
                    <match serverVariable="RESPONSE_LOCATION" pattern="/go(.*)" />
                    <action type="Rewrite" value="/fts{R:0}" />
                </rule>
		<rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1">
                    <match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script, CustomTags" customTags="dataHref" pattern="^/(.*)" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="true" />
                    <action type="Rewrite" value="https://dmstest.psc.sc.gov/fts/{R:1}" />
                </rule>
                
		
                <preConditions>
                    <preCondition name="ResponseIsHtml1">
                        <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
                    </preCondition>
                </preConditions>
                <customTags>
                    <tags name="dataHref">
                        <tag name="tr" attribute="data-href" />
                    </tags>
                </customTags>
            </outboundRules>
            <rules>
                <clear />
                <rule name="ReverseProxyInboundRule1" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="http://localhost:8080/{R:1}" />
                </rule>
            </rules>
        </rewrite>
        <urlCompression doStaticCompression="false" doDynamicCompression="false" />
    </system.webServer>
</configuration>


(from github.com/marevol)
I think that rewriting Location response header is failed in your reverse proxy setting.

(from github.com/zaryk)
For the /go/, I think the problem is that since the url is generated in javascript, it doesn’t have a chance to write it to /fts/go. The rules are on the web.config of the FTS folder, not the main application. I could add rules to the main application, but for /admin/ would interfere with the main applications /admin/

EDIT:
For the /admin/, may be because you use tr data-href and need to add a custom tag, but have to update urlrewrite due to bug in the current installation for handling attributes with hyphen.

(from github.com/zaryk)
I fixed /admin/ when selecting the items by updating UrlRewrite to 2.1, and adding the additional FilterByTag. Looking into /go/.

(from github.com/zaryk)
any way to disable click tracking /go/? Ive tried rewrites and redirects from both /fts/ folder and main application folder, and so far nothing is working.

(from github.com/marevol)
To disable a click logging, remove link class of a tag in searchResults.jsp.

(from github.com/zaryk)
cool. its a manageable solution. Closing.