Tomcat ssl报错Connector attribute SSLCertificateFile must be defined when using SSL with APR解决方法

发布时间:2022-04-24 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了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:  password
Re-enter new password: password
What is your First and last name?
  [Unknown]:  Loiane Groner
What is the name of your organizational unit?
  [Unknown]:  home
What is the name of your organization?
  [Unknown]:  home
What is the name of your City or Locality?
  [Unknown]:  Sao Paulo
What is the name of your state or Province?
  [Unknown]:  SP
What is the two-letter country code for this unit?
  [Unknown]:  br
Is CN=Loiane Groner, OU=home, O=home, L=Sao Paulo, ST=SP, C=BR correct?
  [no]:  y
 
Enter key password for
    (RETURN if same as keystore password):  password
Re-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" />

脚本宝典总结

以上是脚本宝典为你收集整理的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解决方法所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。