SSL in Tomcat 7

I am trying to follow the instructions to configure SSL in Tomcat 7 for a local application. I really don't understand what I'm doing here, so please excuse my approach. I create a keystore like this:

keytool -genkey -alias tomcat -keyalg RSA Enter keystore password: changeit Re-enter new password: changeit What is your first and last name? [Unknown]: Robert Bram What is the name of your organizational unit? [Unknown]: Developers What is the name of your organization? [Unknown]: MyBusiness What is the name of your City or Locality? [Unknown]: Melbourne What is the name of your State or Province? [Unknown]: Victoria What is the two-letter country code for this unit? [Unknown]: AU Is CN=Robert Bram, OU=Developers, O=MyBusiness, L=Melbourne, ST=Victoria, C=AU correct? [no]: yes Enter key password for <tomcat> (RETURN if same as keystore password): 

Then I added the Connector port to my server.xml:

 <Connector port="8443" maxThreads="200" scheme="https" secure="true" SSLEnabled="true" keystoreFile="${user.home}/.keystore" keystorePass="changeit" clientAuth="false" sslProtocol="TLS"/> 

I exported the certificate:

 keytool -export -alias tomcat -file tomcatcertfile.cer Enter keystore password: changeit Certificate stored in file <tomcatcertfile.cer> 

I restarted Tomcat. I load my application https: // localhost: 8443 / blah / myapp in IE. It shows a certificate error.

I click "Certificate Error" in the address bar> click "View Certificates"> click "Install Certificate"> "Next"> "mark". Put all certificates in the following store. > click Browse> Trusted Root Certification Authorities> Next> Finish> Yes> OK> OK.

Now, when I go to the page, I see "The security certificate presented on this website has been issued for a different website address."

So what exactly am I doing wrong?

Thanks for any advice!

Rob :)

+7
source share
1 answer

Instead of entering your name, enter the host name of the server.

+6
source

All Articles