Tomcat SSL Error connector attribute Sslcertificatefile must is defined when using SSL with APR solution _tomcat

Source: Internet
Author: User

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"/>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.