当前位置: 代码迷 >> 综合 >> linux centOS tomcat https配置
  详细解决方案

linux centOS tomcat https配置

热度:93   发布时间:2023-10-17 20:06:24.0

1,生成keystore

 

jre/bin目录下执行下面的命令生成keystore

 

keytool -genkey -alias tomcat -keyalg RSA  -keystore "/home/tomcat85/bin/test.keystore"

 

2,修改server.xml

 

 

<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"

                maxThreads="150" scheme="https" secure="true"

                keystoreFile="bin/test.keystore" keystorePass="111111"

                clientAuth="false" sslProtocol="TLS" />

3开启443端口

/sbin/iptables -I INPUT -p tcp --dport 443 -j ACCEPT

保存设置

/etc/rc.d/init.d/iptables save

3,访问https地址,

没有SSL证书,部分浏览器会拦截

 

 

 

 

 

 

  相关解决方案