其实网上有很多安装的教程,这里简单放一些参考链接:
https://cloud.tencent.com/document/product/400/35224
但应该有很多人和我一样,按照教程改了 tomcat 的 server.xml 后,启动是报错 Connector attribute SSLCertificateFile must be defined when using SSL with APR
https://img-blog.csdnimg.cn/20191203201625852.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0RvYmlsaXR5,size_16,color_FFFFFF,t_70" alt="Connector attribute SSLCertificateFile must be defined when using SSL with APR" />
以下是我成功的配置:
<Connector port="443" protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
sslProtocol="TLS"
keystoreFile="${your jks file path}"
keystorePass="${your password}"
clientAuth="false"/>
关键点:把 protocol=“HTTP/1.1” 改成 protocol=“org.apache.coyote.http11.Http11Protocol”,然后增加一个 sslProtocol=“TLS”