Tomcat SSL证书配置步骤
一 准备与前置检查
二 准备证书文件 JKS 或 PFX
三 配置 server.xml
<Connector port="443"
protocol="org.apache.coyote.http11.Http11Protocol"
maxThreads="150" SSLEnabled="true"
scheme="https" secure="true"
keystoreFile="cert/server.jks"
keystorePass="证书密码"
clientAuth="false" sslProtocol="TLS" />
<Connector port="443"
protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateKeystoreFile="cert/server.jks"
certificateKeystorePassword="证书密码"
type="RSA" />
</SSLHostConfig>
</Connector>
<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>
四 启动与验证
五 常见问题与排查