Confluence SSL
Asked by Kevin Decker:

I've acquired an SSL cert for our confluence instance (Windows server 2012) and I'm having some difficulty with installing it. I've gone through the documentation on here but we still run into an issue where the site is not secure. Any ideas? Here is what the cert looks like. ![confluence.PNG](/t5/image/serverpage/image-id/14951i07D4277B4096408A/image-size/large?v=v2&px=999 "confluence.PNG")


Answers:
author: Shannon S
body: Kevin,

What exactly is happening? Are all requests [not being automatically routed to HTTPS](https://confluence.atlassian.com/doc/running-confluence-over-ssl-or-https-161203.html#RunningConfluenceOverSSLorHTTPS-Step5.AddaSecurityConstrainttoRedirectAllURLstoHTTPS)?

Can you show us any messages you're seeing about the cert not being secure?

Regards,

Shannon

comments: author: Kevin Decker
body: Shannon,

I went through the process of importing the cert \& then I imported the root \& intermediate certs as I saw in some of the documentation. After doing so I made the changes to the base url and the xml as documented and restarted the instance. When trying to navigate to the https link we get the below message. ![Screen Shot 2018-02-14 at 10.59.38 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/14986i423E6E452B97640F/image-dimensions/308x125?v=v2 "Screen Shot 2018-02-14 at 10.59.38 PM.png")

However navigating to the http link does work but displays the messaging below

![Screen Shot 2018-02-14 at 10.57.15 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/14985iBFA7451BC7A2E0CA/image-size/large?v=v2&px=999 "Screen Shot 2018-02-14 at 10.57.15 PM.png")


author: Shannon S
body: Kevin,

Could you run through this troubleshooting using SSLPoke and let us know what comes back?

* [Connecting to SSL Services](https://confluence.atlassian.com/jira/connecting-to-ssl-services-117455.html)

Can you also let me know if you get that error in more than just Chrome?

Lastly, if you click on that \*Not Secure\* error in your address bar, can you show me the information that is provided?

Kind Regards,

Shannon


author: Kevin Decker
body: Shannon,

Forgive me here but I'm not familiar with how to utilize SSLPoke and after looking at the documentation I was not able to get it to run successfully. I downloaded the file to the server and then ran the command as it stated on the steps but no luck.

This occurs in any browser \& I will get you a screenshot of what shows up on the address bar.

Thank you!

-Kevin


author: Shannon S
body: Kevin,

You can paste in reply to this with what the error message is that you're getting when you try to run SSLPoke? It will help me to understand why it's not running properly.

You can include the steps you were able to complete and let me know where it fails.

Regards,  
Shannon


author: Kevin Decker
body: Shannon,

```
C:\Windows\System32>$JAVA_HOME/bin/java SSLPoke confluence.mcsonj.org 8090
'$JAVA_HOME' is not recognized as an internal or external command,
operable program or batch file.
```

I'm assuming that the file needs to be in a certain directory etc. on the server right?


author: Shannon S
body: Kevin,

JAVA_HOME refers to a a variable that you have set.

See [Installing Java for Confluence](https://confluence.atlassian.com/doc/installing-java-for-confluence-144212101.html):

Installing the JDK on Windows

Before you start, go to **Control Panel** \> **Programs and Features** to check whether a JDK is already installed.
> To install the JDK on Windows:

1.
   > Download the appropriate [JDK 8 version](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html).Check the [Supported Platforms](https://confluence.atlassian.com/doc/supported-platforms-207488198.html) page to find out which JDK / JRE versions are supported for your version of Confluence.
2.
   > Run the Java installer. Make a note of the installation directory, as you'll need this later.
3.
   > Once the Java installation is complete, check that the `JAVA_HOME` environment variable has been set correctly. Open a command prompt and type `echo %JAVA_HOME%` and hit Enter.
   *
     > If you see a path to your Java installation directory, the `JAVA_Home`environment variable has been set correctly.
   *
     > If nothing is displayed, or only `%JAVA_HOME%` is returned, you'll need to set the `JAVA_HOME` environment variable manually. See [Setting the JAVA_HOME Variable in Windows](https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html) for a step by step guide.

Once you've done this, I recommend restarting the Windows machine. The next time Confluence starts up, if this is set correctly, then Confluence will use this Java installation.

Once that's complete, then start again from [Running Confluence over SSL](https://confluence.atlassian.com/doc/running-confluence-over-ssl-or-https-161203.html) **from the step where you were importing the certificate** and go from there.

Let us know if you have any trouble!

Kind regards,

Shannon


author: Kevin Decker
body: Thanks Shannon, so even through the certs are imported I would need to redo that step or no?


author: Shannon S
body: If you didn't already have JAVA_HOME set up before you did the import, then you will need to do it again because the location is going to be different. Also, some other things do occur in the background besides just the import of files, so this is important to repeat once you have set JAVA_HOME correctly.

Regards,

Shannon


author: Kevin Decker
body: Shannon,

I deleted the certs from the keystore and re-imported them, restarted the instance and the same result occurs, also have the same result with trying to run the sslpoke. Any thoughts?


author: Shannon S
body: Kevin,

So if you reimported the cert after you have run through the instructions I sent to install the latest JDK and set the JAVA_HOME path, can you send the results of the following:

```
echo %JAVA_HOME%
```

and

```
java -version
```

Thank you!

Shannon


author: Kevin Decker
body: Shannon,

I did so, here are the results of the two commands.

C:\\Users\\kdecker\\Desktop\>java -version  
java version "1.8.0_162"  
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)  
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

C:\\Users\\kdecker\\Desktop\>echo %JAVA_HOME%  
C:\\Progra\~1\\Java\\jre1.8.0_162

Thanks!

-Kevin


Tags: ssl