为了使tomcat具有支持ssl的功能,我们需要配置tomcat安装目录下的*/conf/server.xml的有关信息.具体方法如下:
首先要为tomcat服务器建立一个证书:keytool -genkey -alias * -keystore *;并放在tomcat安装目录下.
然后修改*/conf/server.xml,把下面的注释去掉,并修改红字区域
<!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true">
<Factory clientAuth="false" keystoreFile="server.keystore" keystorePass="password" protocol="SSL" />
</Connector>
本文地址:http://com.8s8s.com/it/it12347.htm