2009年3月4日 星期三

Tomcat 5.5 SSL Configuration

  • Create a certificate keystore by executing the following command:
    keytool -genkey -alias tomcat -keyalg RSA
    and specify a password value of "changeit".
  • Uncomment the "SSL HTTP/1.1 Connector" entry in $CATALINA_HOME/conf/server.xml and tweak as necessary.
  • Add keystorePass element if you used a different keystore (and Certificate) password than the one Tomcat expects (changeit).
  • Delete the certificate keystore:
    keytool -delete -alias tomcat
  • Change the password from “changeit” to “newpass”:
    keytool -keypasswd -alias tomcat -keypass changeit -new newpass

  • The keystore is by default stored in a file named .keystore in the user's home directory, as determined by the "user.home" system property.

  • Read http://java.sun.com/j2se/1.3/docs/tooldocs/win32/keytool.html for more information about keytool.

  •