1.第一步我们需要购买https服务,购买地址
2.打开conf/server.xml
3.找到8443端口 修改为443,
4.找到下面这段代码把注释去掉:
其中certificateKeystoreFile就为证书存放的地址,可以使用相对地址,也可以是绝对地址
<Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateKeystoreFile="conf/local.jks"
certificateKeystorePassword="xxxx"
type="RSA" />
</SSLHostConfig>
</Connector>