Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Confluence on IIS results in redirect loop

Asaf Sitner August 24, 2014

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

0 votes
Tiago Comasseto
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 24, 2014

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

Asaf Sitner August 24, 2014

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?

Tiago Comasseto
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 24, 2014

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

Asaf Sitner August 24, 2014

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.

Asaf Sitner August 26, 2014

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
TAGS
AUG Leaders

Atlassian Community Events