您的位置:首页 > 理论基础 > 计算机网络

[学习] 配置tomcat以便能使用HTTPS进行连接.

2010-06-24 10:47 381 查看
由于工作需要, 查了下怎么配置Tomcat 5 才能访问使用https访问系统.

 

转自: http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html
 

To install and configure SSL support on Tomcat 5, you need to follow
these simple steps. For more information, read the rest of this HOW-TO.

Create a certificate keystore by executing the following command:
Windows:





%JAVA_HOME%/bin/keytool -genkey -alias tomcat -keyalg RSA





Unix:





$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA





and specify a password value of "changeit".

Uncomment the "SSL HTTP/1.1 Connector" entry in
$CATALINA_HOME/conf/server.xml

and tweak as necessary.

 

从这看出, 相当简单的配置, 可惜我一直不知道.

首先执行:

"%JAVA_HOME%/bin/keytool" -genkey -alias tomcat -keyalg RSA

然后依次输入一些必要信息.

执行命令成功后, 直接取消
$CATALINA_HOME/conf/server.xml这个文件里面的关于SSL配置的注释即可.


 

最后,通过https和8443端口, 直接就可以访问了.

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息