Running Confluence over https

Hello people

I would like run Confluence over https. Im running a standalone version 3.5.5.

I have a certificate provided by my Company but the extension of certificate is .cer.

According to the documentation there is not a step that explain how to do with a certificate .cer.

Any idea?

Thanks in advance.

Kind regards,

Jose

2 answers

1 accepted

0 votes
Answer accepted

Hi Jose,

It's in the documentation you linked. You'll want to import your cert into the keystore (step 1, certificate option 2, number 5):

keytool -importcert -alias tomcat -keystore <MY_KEYSTORE_FILENAME> -file <MY_CERTIFICATE_FILENAME>

Jeremy

Thank you for your fast reply.

I was a little confused.

Now, I have other question. I can not find my .kesystore to replace in <MY_KEYSTORE_FILENAME>

Must .keystore be generated? Or where it should be?

Thanks.

Jose

I believe that's under step 3:

  • On Windows: <tt>C:\Documents and Settings\\#CURRENT_USER#\.keystore</tt>
  • On OS X and UNIX-based systems: <tt>~/.keystore</tt>

Jeremy,

There is not a fille called .keystore.

I generated one executing:

"%JAVA_HOME%\bin\keytool" -genkeypair -alias tomcat -keyalg RSA

But I execute:

keytool -importcert -alias tomcat -keystore <MY_KEYSTORE_FILENAME> -file <MY_CERTIFICATE_FILENAME>

An exceptions is raised:

keytool error: java.lang.Exception: Public keys in reply and keystore don't match

What is wrong?

Thanks,

Jose

I'm guessing that you might have imported a self-signed certificate for your domain already (ie - you've already got something with that alias?) If you google the error 'Public keys in reply and keystore don't match' you'll see a bunch of resources about it. You can consider this independently of Confluence. It's a Tomcat + SSL issue, and will have lots of solutions from other Tomcat users for the same SSL problem.

Here's one good one:

http://old.nabble.com/Unable-to-import-certificate-into-keystore-td19416557.html

Jeremy,

Yes, the error was a replicated alias.

Anyway I followed all steps but I cant see Confluence over https.

Thanks

If you can still get to Confluence over http but not https, make sure you've uncommented the ssl connector in server.xml.

You are right, I can get to Confluence over http (port 8090) but no https (port 8443)

Yes, the ssl connector is enabled in server.xml

<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" SSLEnabled="true"

URIEncoding="UTF-8" keystorePass="changeit"/>

You are right, I can get to Confluence over http (port 8090) but no https (port 8443)

Yes, the ssl connector is enabled in server.xml

<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" SSLEnabled="true"

URIEncoding="UTF-8" keystorePass="changeit"/>

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

292 views 2 12
Read article

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