基于Tomcat 的SSL证书配置步骤
步骤一:生成证书:
(参见http://mazhihui.iteye.com/blog/1012912);
步骤二:配置Tomcat:
找到%TOMCAT_HOME%/conf/server.xml,配置代码:
<Connector SSLEnabled="true" clientAuth="false" keystoreFile="D:/SSL/server/tomcat.keystore" keystorePass="pdepde" maxThreads="150" port="8443" protocol="HTTP/1.1" scheme="https" secure="true" sslProtocol="TLS" truststoreFile="D:/SSL/server/tomcat.keystore" truststorePass="pdepde"/>
<security-constraint><web-resource-collection><web-resource-name>shouye</web-resource-name><url-pattern>/demo.jsp</url-pattern></web-resource-collection><user-data-constraint><transport-guarantee>CONFIDENTIAL</transport-guarantee></user-data-constraint></security-constraint>