How to setup SSL/HTTPS access in Confluence Standalone
This section describes how to enable secure access on a Confluence Standalone instance (running Tomcat 4.1.30). The configuration details may be slightly different for newer versions of Tomcat and different application servers.
Before configuring SSL, an SSL certificate must be created. If you have already configured one, you can skip this step.
Windows configuration
On Windows, perform the following at the command prompt:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA
Unix/Linux configuration
On Unix/Linux, perform the following at the command prompt:
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA
This will also apply to MacOS X systems.
Some questions will be asked, including a password for the certificate (the default is 'changeit'). Please note down what this is, as it will be used in the next step.
Modify the conf/server.xml file
In the confluence directory, open the conf/server.xml file and insert one of the following just after the closing </Engine> tag:
For Tomcat 4 (Confluence 2.1.x and below):
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8443" minProcessors="5" maxProcessors="75"
enableLookups="true" acceptCount="100" debug="0" scheme="https" secure="true" useURIValidationHack="false" disableUploadTimeout="true">
<Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory" clientAuth="false" protocol="TLS" keystorePass="#CERT_PASSWORD#" />
</Connector>
For Tomcat 5.5 (Confluence 2.2 and above):
<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
URIEncoding="UTF-8" keystorePass="#CERT_PASSWORD#" />
Please note that the above configuration is included in the Confluence Standalone conf/server.xml
file, and only needs to be uncommented.
Change #CERT_PASSWORD# to the password you entered for the certificate when you generated it.
After that, restart Tomcat and access your instance on https://host.domain:8443/.
For more detailed information on setting up SSL with Tomcat (including additional configuration options), have a look at Tomcat 4 SSL Howto or Tomcat 5.5 SSL Howto.