咨询热线:4006-75-4006
售前:9:00-23:30 备案:9:00-18:00 技术:7*24h
Connector attribute SSLCertificateFile must be defined when using SSL with APR
上网多方搜索,很多答案都是不启用APR,修改conf/server.xml注释掉下面一段
<!--APR library loader. Documentation at /docs/apr.html --> <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
但是有人说这样会影响性能,那就只能继续找方法了
让我们打开Tomcat的文档webapps/docs/apr.html,其中讲到
<Connector port="443" maxHttpHeaderSize="8192" maxThreads="150" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" SSLEnabled="true" SSLCertificateFile="${catalina.base}/conf/localhost.crt" SSLCertificateKeyFile="${catalina.base}/conf/localhost.key" />
然后我在我的配置文件中对应进行修改,补全指定一下crt和key的位置