科技常识:Tomcat ssl报错Connector attribute SSLCertificateFile must be defined when using SSL with APR解决方法

2021-03-24 07:03:25
导读 今天小编跟大家讲解下有关科技常识:Tomcat ssl报错Connector attribute SSLCertificateFile must be defined when using SSL wi

今天小编跟大家讲解下有关科技常识:Tomcat ssl报错Connector attribute SSLCertificateFile must be defined when using SSL with APR解决方法,相信小伙伴们对这个话题应该也很关注吧,小编也收集到了有关科技常识:Tomcat ssl报错Connector attribute SSLCertificateFile must be defined when using SSL with APR解决方法的相关资料,希望小伙伴会喜欢也能够帮助大家。

今天同事要求帮忙配置tomcat ssl,直接把linux下tomcat配置ssl这篇文章发给他了,没想到他居然说启动tomcat的时候,报Connector attribute SSLCertificateFile must be defined when using SSL with APR的错误,马上跑过去看,原来他的tomcat版本是7.0的,我发给他的是tomcat6的,检查了key,检查了配置文件,因为他直接复制的我发他文章的配置,折腾了2-3个小时,终于把问题给解决了.

系统:windows 7环境:tomcat7

1.先重新给他生成key复制代码 代码如下:keytool -genkey -alias tomcat -keyalg RSA

Enter keystore password: passwordRe-enter new password: passwordWhat is your first and last name? [Unknown]: Loiane GronerWhat is the name of your organizational unit? [Unknown]: homeWhat is the name of your organization? [Unknown]: homeWhat is the name of your City or Locality? [Unknown]: Sao PauloWhat is the name of your State or Province? [Unknown]: SPWhat is the two-letter country code for this unit? [Unknown]: BRIs CN=Loiane Groner, OU=home, O=home, L=Sao Paulo, ST=SP, C=BR correct? [no]: yEnter key password for (RETURN if same as keystore password): passwordRe-enter new password: password

2.tomcat配置ssl

打开server.xml文件里,他们原来是复制代码 代码如下:<Connector port="8443"protocol="HTTP/1.1"SSLEnabled="true"enableLookups="false"acceptCount="100"disableUploadTimeout="true"maxThreads="150"scheme="https"secure="true"clientAuth="false"sslProtocol="TLS"keystoreFile="Users\loiane/.keystore"keystorePass="password"/>

修改为:

复制代码 代码如下:<Connector port="8443"protocol="org.apache.coyote.http11.Http11Protocol"SSLEnabled="true"enableLookups="false"acceptCount="100"disableUploadTimeout="true"maxThreads="150"scheme="https"secure="true"clientAuth="false"sslProtocol="TLS"keystoreFile="Users\loiane/.keystore"keystorePass="password"/>

来源:爱蒂网

免责声明:本文由用户上传,如有侵权请联系删除!

猜你喜欢

最新文章