Tomcat ssl報錯Connector attribute SSLCertificateFile must be defined when using SSL with APR解決方法
今天同事要求幫忙配置tomcat ssl,直接把linux下tomcat配置ssl這篇文章發(fā)給他了,沒想到他居然說啟動tomcat的時候,報Connector attribute SSLCertificateFile must be defined when using SSL with APR的錯誤,馬上跑過去看,原來他的tomcat版本是7.0的,我發(fā)給他的是tomcat6的,檢查了key,檢查了配置文件,因為他直接復制的我發(fā)他文章的配置,折騰了2-3個小時,終于把問題給解決了.
系統(tǒng):windows 7
環(huán)境: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" />
相關(guān)文章
eclipse配置Tomcat找不到server選項的解決辦法
這篇文章通過圖文并茂的形式給大家介紹eclipse配置Tomcat找不到server選項的解決辦法,感興趣的朋友跟隨腳本之家小編一起學習吧2018-05-05基于Tomcat 數(shù)據(jù)源的原理、配置、使用介紹
下面小編就為大家?guī)硪黄赥omcat 數(shù)據(jù)源的原理、配置、使用介紹。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2017-08-08Tomcat中catalina.bat設(shè)置為UTF-8控制臺出現(xiàn)亂碼
這篇文章主要介紹了Tomcat中catalina.bat設(shè)置為UTF-8控制臺出現(xiàn)亂碼,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2021-03-03