在 TOMCAT/conf/server.xml 中,修改与 SSL 相关的那一段,我改成下面这样:
<!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true" keystorePass="******"
clientAuth="false" sslProtocol="TLS" />
这里要指定keystorePass,如果写错了,会出现下边的错误:
严重: Error initializing endpoint
java.io.IOException: Keystore was tampered with, or password was incorrect
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:768)
wakan@wakan:~/tomcat2/bin> ./startup.sh
Using CATALINA_BASE: /home/wakan/tomcat2
Using CATALINA_HOME: /home/wakan/tomcat2
Using CATALINA_TMPDIR: /home/wakan/tomcat2/temp
Using JRE_HOME: /home/jdk150/jre
2007-3-26 17:09:39 org.apache.catalina.core.AprLifecycleListener lifecycleEvent