Tomcat Configuration HTTPS protocol

Source: Internet
Author: User

Tomcat Configuration HTTPS protocol

1. Locate the bin directory under the local JDK, there is a file Keytool.exe under the Bin directory (in the Bin directory space, hold down SHIFT right-click, open the Command window, for example)

2. In the cmd Command window, enter the command (keytool -genkeypair -alias "Tomcat" -keyalg "RSA" -keystore "D : \tomcat.keystore " )

Follow the prompts to enter:

KeyStore Password : 123456 (This password is very important)

First and last name : 192168. 1. 119 (Domain name or IP address to be accessed later, very important, certificate and domain name or IP binding)

Organizational unit name : anything (optional)

Organization Name : anything (optional)

City : Anything (fill in)

Provinces and municipalities : anything (optional)

Country Area code : Anything (fill in)

After all the input is finished, a Tomcat.keystore file is generated under the D disk according to your command, which is the file we need

At this time, we need to open our Tomcat configuration file server.xml This file, to configure HTTPS (file under tomcat/conf)

1. Note <listener classname= "Org.apache.catalina.core.AprLifecycleListener" sslengine= "on"/>

2. Uncomment the line and add two properties keystoreFile keystorePass .

After all, restart Tomcat, we can use the other HTTPS access to our own IP, such as the HTTPS://192.168.1.119:8443/project, the port number is set above the 8443, not the original project of 8080

Tomcat Configuration HTTPS protocol

Related Article

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.