Today colleagues asked to help configure Tomcat SSL, directly to the Linux under Tomcat configuration SSL This article to him, did not think he actually said to start Tomcat, reported connector attribute sslcertificatefile must is defined when using SSL with Apr error, ran to see immediately, originally his Tomcat version is 7.0, I sent him is Tomcat6, checked the key, checked the configuration file, because he directly copied I sent his article configuration, After 2-3 hours of tossing and turning, the problem was finally solved.
System: Windows 7
Environment: TOMCAT7
1. Create key for him first
Copy Code code as follows:
Keytool-genkey-alias Tomcat-keyalg RSA
Enter KeyStore Password:password
Re-enter New Password:password
What is your name?
[Unknown]: Loiane groner
What is the name of your organizational?
[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 Configuring SSL
Open Server.xml file, they turned out to be
Copy Code code as follows:
<connector port= "8443" protocol= "http/1.1" sslenabled= "true" enablelookups= "false"
Acceptcount= "disableuploadtimeout=" "true"
maxthreads= "Scheme=" "https" secure= "true"
Clientauth= "false" sslprotocol= "TLS"
Keystorefile= "Users\loiane/.keystore"
keystorepass= "Password"/>
Modified to:
Copy Code code as follows:
<connector port= "8443" protocol= "Org.apache.coyote.http11.Http11Protocol" sslenabled= "true"
Enablelookups= "false"
Acceptcount= "disableuploadtimeout=" "true"
maxthreads= "Scheme=" "https" secure= "true"
Clientauth= "false" sslprotocol= "TLS"
Keystorefile= "Users\loiane/.keystore"
keystorepass= "Password"/>