Confluence Redirect HTTP Requests to HTTPS

How do you redirect http requests to https

2 answers

On server.xml file:

Linux path:  /opt/atlassian/confluence/conf/server.xml

Windows path: C:\Program Files\Atlassian\Confluence\conf\server.xml    

Leave the original port open:  

Example:

  <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" />  

 

 Along with ssl port:

Example:

  <Connector port="8443" maxHttpHeaderSize="8192"                    maxThreads="150" minSpareThreads="25"                    protocol="org.apache.coyote.http11.Http11NioProtocol"                    enableLookups="false" disableUploadTimeout="true"                    acceptCount="100" scheme="https" secure="true"                    clientAuth="false" sslProtocols="TLSv1,TLSv1.1,TLSv1.2" sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" SSLEnabled="true"                    URIEncoding="UTF-8" keystorePass="changeit" keystoreFile="/var/atlassian/key.jks"/>

 

Add to web.xml:  

Linux path: /opt/atlassian/confluence/confluence/WEB-INF/web.xml

Windows path: C:\Program Files\Atlassian\Confluence\confluence\WEB-INF\web.xml

Add:

 

<security-constraint>         <web-resource-collection>                 <web-resource-name>all-except-attachments</web-resource-name>                  <url-pattern>/*</url-pattern>         </web-resource-collection>         <user-data-constraint>                 <transport-guarantee>CONFIDENTIAL</transport-guarantee>         </user-data-constraint> </security-constraint>

 

Before end of web.xml file: </web-app>

*Restart confluence service post changes on these files for the configuration to take place.

*Recommended to always do server side changes on test env before implementing on prd env

<rule>

<condition type="scheme" operator="equal">https</condition>

example.com">operator="equal">example.com

<condition type="port" operator="equal">443</condition>

<from>^/(.*)</from>

http://example.com/$1

</rule>
 You may have a look at 

https://confluence.atlassian.com/fishkb/how-do-i-redirect-http-requests-to-https-without-proxy-707724570.html

 

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...

1,370 views 24 10
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