I am trying to setup SSL to my web app and followed tutorial (http://techtracer.com/2007/09/12/setting-up-ssl-on-tomcat-in-3-easy-steps/), then hitting http://localhost:8443
returns "unable to connect"
Environment:
Tomcat6, windows 7
Tomcat6 is up and running, http://localhost:8080
displays tomcat page.
Below is the step I took so far:
1. Generate keystore file
C:\Program Files\Java\jdk1.6.0_21\bin>keytool -genkey -alias masatosanssl -keypass masatosanadmin -keystore masatosanssl.bin -storepass
masatosanadmin
then I answered the questionnaire.
masatosanssl.bin is created and I've moved the file to my webapp dir which is at:
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\head_first\masatosanssl.bin
2. Configuring Tomcat for using the Keystore file
Modify server.xml
Location: C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\head_first\masatosanssl.bin"
keystorePass="masatosanadmin"
/>
Then I restart tomcat and hit https://localhost:8443 returns "cannot display page", I've tried changing server.xml keystoreFile path to relative etc but none seems to work.
What am I missing here?