安装目录 D:\Program Files (x86)\apache-tomcat-10.0.27\cert
配置server.xml
首先,修改tomcat的端口8080为80,8443端口为443,修改后的文件配置为下:
<Connector port="80" Protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="443" />
修改配置文件
<Connector protocol="org.apache.coyote.http11.Http11NioProtocol"port="443" maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateKeystoreFile="D:\Program Files (x86)\apache-tomcat-10.0.27\cert\sldmx_com.jks" certificateKeystorePassword="证书密码" type="RSA" />
</SSLHostConfig>
</Connector>
,