1.apr
许多朋友可能在启动tomcat的时候都会看到类似这样的信息:
org.apache.catalina.core.AprLifecycleListener init
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Java\jre\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS
此时,用户主目录下会生成一个.keystore文件。
然后,我们配置server.xml文件,找到SSLEnabled="true"所在的标签,将其解除注释,同时填补两个属性:
1.keystoreFile="C:/Users/Zlex/.keystore"
2.keystorePass="123456"
keystoreFile 指的是你的密钥文件存储的路径,keystorePass指的是你的密码。
举例如下:
<!--
Define a SSL HTTP/1.1 Connector on port 8443 This connector uses the
JSSE configuration, when using APR, the connector should be using the
OpenSSL style configuration described in the APR documentation
-->
<!-- -->
<Connector
SSLEnabled="true"
clientAuth="false"
keystoreFile="C:/Users/Zlex/.keystore"
keystorePass="123456"
maxThreads="150"
port="8443"
protocol="HTTP/1.1"
scheme="https"
secure="true"
sslProtocol="TLS" />