找到server.xml,找到ssl这一段
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />-->
去掉这段的注释,添加keystoreFile="C:\tomcat.keystore"
keystorePass="changeit "的属性
改动完成后配置为: 可以直接拷贝复制进去即可
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" keystoreFile="C:\tomcat.keystore" keystorePass="changeit " sslProtocol="TLS" /> 注意红线部分是你注册时的密码
然后重启tomcat就能使用HTTPS访问