Introduction to the Tomcat server HTTPS protocol configuration

Source: Internet
Author: User

First, the production of digital signature certificate
1. Generate the certificate with the Keytool tool that comes with the JDK;

2, export the certificate;

3, to the CA signature certification;

Note: For an example of making detailed steps, see the Appendix.

Ii. Modification of Server.xml file

Modify Conf/server.xml, add the following configuration

<connector port= "8443" protocol= "http/1.1" sslenabled= "true"

maxthreads= "Scheme=" "https" secure= "true"

Clientauth= "false" sslprotocol= "TLS"

Keystorefile= "E:/csp_local/keys/keystorea" (Digital certificate inventory placement)

keystorepass= "Changeit"/> (digital certificate library password)





Appendix

Digital Signature Certificate Authoring Example

Assume that the certificate to be generated represents the domain name sso.digitalchina.com, the city is Beijing, country cn, alias Tomcat, the certificate to be generated is stored in the certificate library in the current directory, and the certificate library name is Keystorea.

1. Generate a certificate to be signed

Keytool–genkey–alias tomcat–keyalg Rsa–keystore Keystorea–storepass Changeit

Execute the above command and follow the prompts to enter:

What is your first and last name (hint): sso.digitalchina.com (Input)

What is your organizational unit name (hint): digitalchina.com (Input)

What is your organization name (hint): SSO (Input)

What is the name of your city or region (hint): Beijing (Input)

What is the name of your state or province (hint): Beijing (Input)

What is the two-letter country code for this unit (hint): CN (Input)

is CN=SSO.DIGITALCHINA.COM,OU=DIGITALCHINA.COM,O=SSO,L=BEIJING,ST=BEIJING,C=CN correct? [No] (hint): Y (Input)

Enter <digitalchina> master password (if same as KeyStore password press ENTER): Enter



After the above steps, the file Keystorea is generated in the current directory.

2. Export the certificate to be signed

Export to the Cert directory under the current directory

Keytool–export–alias tomcat–file Cert/tomcat.jks–keystore Keystorea–storepass Changeit

After executing the above command, the certificate file Tomcat.jks is generated under the Cert directory.

3. Import the certificate to be signed

To import the certificate into the default certificate library, $java_home/jre/lib/security/cacerts, assuming that the default password for the library is Changeit, you need to perform the following import command.

Keytool-import-alias tomcat-file cert/tomcat.jks-keystore $JAVA _home/jre/lib/security/cacerts-storepass Changeit



Execute the above command to import into a virtual machine in the current environment.

Introduction to the Tomcat server HTTPS protocol configuration

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.