Confluence behind reverse proxy (iis)

Fabi August 20, 2018

Hello all,

I just purchased a license for confluence. I installed it successfully and configured a reverse proxy in IIS 10 (Windows Server 2016) with SSL connection.

That works perfectly. I just had to change the Base URL and the tomcat server.xml.

But now I have a problem with exactly that configuration. I have received the requirement to put another login form in front of the confluence system. I hope you can understand what I mean.
We want to do this so that some people in our AD without a confluence license can access some confluence content wich is "publically" available (anonymous access activated). The login form infront of confluence should control that "public" access so only users which are authorized against our AD can access confluence.

 

I thought I just can enable "Windows Authentication" for the Website in IIS which is configured as the reverse Proxy. It looks like it works - there is a username/password prompt. I can enter my credentials, but then I get this error:

confluence arr login 1.PNGNow I reload the page with F5, then I see that:

confluence arr login 2.PNGIt looks better, but not correct at all.... Another reload:

confluence arr login 3.PNGNow, alls seems to be good. I can login and do things....

 

But this isn't user friendly... Is there a way to go directly to my third screenshot without two page reloads? ;)

 

Here is my web.config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP/S to HTTPS Redirect" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{SERVER_PORT_SECURE}" pattern="^0$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
</rule>
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://confluence:8090/{R:1}" />
<serverVariables>
<set name="HTTP_ACCEPT_ENCODING" value="true" />
</serverVariables>
</rule>
</rules>
<outboundRules>
<rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1" stopProcessing="true">
<match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script" pattern="^(.*)" />
<action type="None" value="/{R:1}" />
</rule>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
</system.webServer>
</configuration>

 

 I hope somebody can help me there...

Thanks in advance!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events