I am setting up a reverse proxy in IIS for Confluence (eventually Jira, Bitbucket and Bamboo too) based on the directions here (https://confluence.atlassian.com/kb/proxying-atlassian-server-applications-with-microsoft-internet-information-services-iis-833931378.html) and I can't get it to work. I am trying to setup the proxy from https://server.domain.com/confluence and based on my understanding of the documentation I change the context path from this:
<Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true">
to this:
<Context path="/confluence" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true">
and I commented out the default connector for the HTTPS Proxying one from the config file and set it up as recommened like this
<Connector port="8090" connectionTimeout="20000" redirectPort="8443"
maxThreads="48" minSpareThreads="10"
enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
protocol="org.apache.coyote.http11.Http11NioProtocol"
scheme="https" secure="true" proxyName="server.domain.com" proxyPort="443"/>
I setup the rules for the URL rewrite, and Syncology setup via the IIS Manager UI and it saves my changes to web.config as the following:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Confluence Proxy" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://server.domain.com:8090/{R:1}" />
</rule>
<rule name="Synchrony HTTP" stopProcessing="true">
<match url="synchrony/(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="http://localhost:8091/synchrony/{R:1}" />
</rule>
<rule name="Synchrony Web Sockets Reverse Proxy" stopProcessing="true">
<match url="ws://(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="ws://localhost:8091/{R:1}" />
</rule>
<rule name="Confluence Reverse Proxy" enabled="false" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="http://localhost:8090/{R:1}" />
</rule>
</rules>
</rewrite>
<security>
<requestFiltering allowDoubleEscaping="true" />
</security>
<caching enabled="false" enableKernelCache="false" />
</system.webServer>
</configuration>
But then after I save all config changes, and start the Confluence server I get this error from Tomcat when I go to https://server.domain.com/confluence almost immediately:
HTTP Status 404 – Not Found
Type Status Report
Message Not found
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.10
However if I keep all my settings the same but remove the /confluence from the context path, the browser will load for a bit and then attempt to bring up the login page but doesn't append the /confluence folder to the end (due to the context path not being there I assume). With either configuration when I check the Tomcat logs (C:\Program Files\Atlassian\ApplicationData\Confluence\logs) there are no errors in the log and the warnings that are there are the same as I saw before setting this up, so nothing seems out of what is expected there. What am I missing here in the setup? Let me know if you need any other information on this.