https

本文详细介绍了如何在本地服务器上设置Tomcat服务器并配置HTTPS协议,包括生成SSL证书、修改server.xml文件、重启Tomcat以及解决无法访问网站的问题。通过使用Java Keytool工具生成.keystore文件,确保了安全的HTTPS连接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

if we want to setup a site in https://localhost:8643

setup a website in
/var/lib/tomcat5/webapps

then in the /etc/tomcat5
gedit server.xml

generate a line in server.xml;
  <Connector port="8643" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" disableUploadTimeout="true"
               acceptCount="100" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" />

restart the tomcat5

service tomcat5 restart

at this time, if we open
https://localhost:8643
we can not open a website

in the home of root:
root@raid932client ~]# $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA -validity 3650 -keysize 2048

 

generate a .keystore in the $HOME directory.

then we will be able to open
https://localhost:8643

转载于:https://www.cnblogs.com/greencolor/archive/2012/04/22/2465650.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值