Confluence on IIS results in redirect loop

I've followed the instructions found in the documentation and connected Confluence to an IIS7 website (on windows server 2012).

The Confluence installtion at <mydomain>/confluence works properly, but the requests to the site on other paths (i.e. <mydomain>/*) result in a redirect loop and the page doesn't load.

The server.xml file looks like this:

&lt;Server port="8000" shutdown="SHUTDOWN" debug="0"&gt;
    &lt;Service name="Tomcat-Standalone"&gt;
        &lt;Connector port="8090" connectionTimeout="20000" redirectPort="8443" maxThreads="200" minSpareThreads="10" enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" /&gt;
        &lt;Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" URIEncoding="UTF-8" /&gt;
         
        &lt;Engine name="Standalone" defaultHost="localhost" debug="0"&gt;
          &lt;Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false"&gt;

                &lt;Context path="/confluence" docBase="../confluence" debug="0" reloadable="false"&gt;
                    &lt;Manager pathname="" /&gt;
                &lt;/Context&gt;
            &lt;/Host&gt;
        &lt;/Engine&gt;
    &lt;/Service&gt;
&lt;/Server&gt;

Am I missing something?

1 answer

Hi Asaf, personally I really hate AJP, I lost my temper many times with it... then my live changed when I discovered ARR, you can see how this configuration is set here. It says JIRA there, but the steps are exactly the same for Confluence.

I hope it helps.

Cheers

So how exactly do I set this up as a non-subdomain?

The documentation only explains confluence.mydomain.com, but what do I need to do if I want to make it into mydomain.com/confluence?

I've tried setting a rewrite rule that with the pattern /confluence/.* to keep the rest of the site intact, and with the destination of localhost:8090/{R:0} (the default confluence settings).

In the server.xml file I've added the proxy name to mydomain.com and the port to 80.

However, I'm getting a 404 error on any matching request (mydomain.com/confluence/anything). Any ideas where I messed up?

Hi Asaf, you can use the pattern exactly as in the KB, you can use (.*) in IIS and set the contect path (/confluence) in your server.xml

Cheers

I tried that, so that the pattern is .* in the IIS redirect rule, and the server.xml proxy name is set to mydomain/confluence

But now I'm getting server error 404 on the site root, and the confluence path points to mydomain/confluence/confluence/*

So the confluence installation works in this configuration, but not the rest of the site.

Oh, and by the way, I had to change the redirect path's arguments from {R:1} to {R:0}, otherwise I'm getting error 500.50 for invalid rewrite parameter. IIS also warns that 1 is not a legal reference.

I've made no progress since.

I read somewhere that it's possible to do this with server farms - is it true? Should I try this approach?

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,942 views 27 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you