把Tomcat的http改为https的步骤方法 发表于 2019-06-27 更新于 2023-03-01 分类于 Tomcat 本文字数: 90 阅读时长 ≈ 1 分钟 生成证书1keytool -genkey -alias tomcat -keyalg RSA -keystore D:\\a.keystore 按步骤输入相关信息 修改tomcat相关配置conf/server.xml12345<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="D:\a.keystore" keystorePass="123456" /> conf/web.xml123456789<security-constraint> <web-resource-collection > <web-resource-name>SSL</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint>