Tomcat Ssl Https Configuration
To enable ssl (https) on tomcat 5.5 you can follow these steps:
- create keystore on home directory of os user
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA -keystore .keystore
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA -keystore .keystore
- edit server.xml
<-- Define a blocking Java SSL Coyote HTTP/1.1 Connector on port 8443 -->
<Connector protocol="org.apache.coyote.http11.Http11Protocol"
port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
keystoreFile="${user.home}/.keystore" keystorePass="changeit"
clientAuth="false" sslProtocol="TLS" />
- start tomcat server and open https://localhost:8443
Reference:
http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html