Installing Atlassian Confluence 6.5+ on Windows Server (IIS 7+)

What you will need:

  1. You must have IIS version 8.0 or higher installed (it does work on 7 too)
  2. You must have Web Sockets Support for IIS installed
  3. You must have Application Request Routing 3.0 installed

Once you have installed and configured confluence to run on your local server, you can point an external domain to it (for example http://confluence.carra-lucia.co.uk) and make the local server installation available externally.

First, you need to go to services and shut down the Atlassian Confluence Service.

Go to C:\Program Files\Atlassian\Confluence\conf\server.xml and update the connector XML node to contain the following three new items: proxyName, proxyPort, scheme.

For each application, find the normal (non-SSL) Connector directive in the Tomcat server.xml file, and add the scheme,  proxyName, and proxyPort attributes inside the Connector directive, as below. Use the default values for the other attributes, including for  port , unless you have a particular reason to change them, and use your own domain name for the proxyName value:


	maxThreads=
    minSpareThreads=
    connectionTimeout=
    enableLookups=
    maxHttpHeaderSize=
    protocol=
    useBodyEncodingForURI=
    redirectPort=
    acceptCount=
    disableUploadTimeout=
	proxyName="..com"
	proxyPort="80"
	scheme="http"/>

Note that the proxyName parameter should be set to the FQDN that IIS will be configured to serve. This is the address a user would type into their browser to access the application. For example:

  • use .ourcompany.com to access the application at a sub-domain like http://.ourcompany.com/
  • use ourcompany.com to access the application at a context path like http://ourcompany.com/ . In this case, the context path should not be included in the proxyName parameter, and you would have already set the Contextdirective in step 2 above.
  • use proxyPort=”443” and scheme=”https” in case the SSL is being terminate at IIS.Proxy.PNG

Configure Internet Information Services (IIS)

1. Be sure you have ARR, URL rewrite and Request Filtering installed on your IIS server

In case you do not have Application Request Routing and URL Rewrite on your IIS server install them using Web Platform Installer.

In case Request Filtering is not installed in your IIS instance you can install it following https://www.iis.net/configreference/system.webserver/security/requestfiltering.

2. Enable Proxying on ARR

  1. From the IIS7 Console, click on Server_Name and  open Application Request Routing Cache:
  2. From the Actions panel on the right hand side, select  “Server Proxy Settings
  3. Check “Enable Proxy” and set HTTP Version to “HTTP/1.1“:
  4. Deselect “Reverse rewrite host in response headers” then leave all the other options on the default value and click on Apply to apply the changes.

Add a new IIS Website

Point the website to the local folders (you can create a new one if needed). Folder will be a dummy as the Confluence application is hosted on tomcat.

WebsiteSetup

Make sure that your bindings show the external URL you will be using

ExternalBindings

Drop a new web.config file in the folder you have created with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
 <system.webServer>
 <rewrite>
 <rules>
 <clear />
 <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" 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>
 </system.webServer>
</configuration>

Final settings

Start tomcat / (Go to services and restart the Confluence service) and then log in locally. Go to General Settings and change the Server Base URL:
http://localhost:8090/admin/viewgeneralconfig.action
Serverbase.PNG

Save and you’re all set.

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.