|
|
Tomcat的证书安装,需要使用Java KeyStore(JKS)文件,这个文件就是我们前面在证书合并是获得的JKS文件,首先将这个文件复制到服务器上,假设保存为c:\ssl.jks。
为了让Tomcat能够使用这张证书,需要修改Tomcat的配置文件Server.xml,以下分别对各种版本的Server.xml配置进行介绍:
< Connector className="org.apache.catalina.connector.http.HttpConnector"
port="443" minProcessors="5" maxProcessors="75"
enableLookups="true"
acceptCount="10" debug="0" scheme="https" secure="true">
< Factory className="org.apache.catalina.net.SSLServerSocketFactory"
clientAuth="false" protocol="TLS"
keystoreFile="c:\ssl.jks"
keystorePass="证书合并时设定的密码"/>
< /Connector>
注意修改以上粗体的部份,保存好修改的Server.xml将Tomcat重启,即完成了SSL证书的安装。
< Connector className="org.apache.catalina.connector.http.HttpConnector"
port="443" minProcessors="5" maxProcessors="75"
enableLookups="true"
acceptCount="10" debug="0" scheme="https" secure="true"
clientAuth="false" protocol="TLS"
keystoreFile="c:\ssl.jks"
keystorePass="证书合并时设定的密码"
< /Connector>
< Connector className="org.apache.coyote.tomcat5.CoyoteConnector"
port="443" minProcessors="5" maxProcessors="75"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true";
clientAuth="false" sslProtocol="TLS"
keystoreFile="c:\ssl.jks"
keystorePass="证书合并时设定的密码"/>
< Connector
port="443" minProcessors="5" maxProcessors="75"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true";
clientAuth="false" sslProtocol="TLS"
keystoreFile="c:\ssl.jks"
keystorePass="证书合并时设定的密码"/>
< Connector
port="443" minSpareThreads="5" maxSpareThreads="75"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="c:\ssl.jks"
keystorePass="证书合并时设定的密码"/>
tomcat 6.0:
http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html
tomcat 5.5:
http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html
tomcat 5.0:
http://tomcat.apache.org/tomcat-5.0-doc/ssl-howto.html
tomcat 4.1:
http://tomcat.apache.org/tomcat-4.1-doc/ssl-howto.html
tomcat 4.0:
http://tomcat.apache.org/tomcat-4.0-doc/ssl-howto.html
|
|
|
|