Tomcat enables the HTTPS protocol configuration process

Source: Internet
Author: User

Local simulation Test opening process

HTTPS If the production environment is applied to the domain name, it is necessary to request the certificate directly or indirectly from the CA to obtain the trust of the browser. Let's first test this process in local simulations, generate the certificates ourselves, and then introduce the domain name to enable HTTPS.

①keytool Tool Generation Certificate

Open the Keytool directory that comes with the JDK.

Here's a brief introduction.

密钥库口令:123456(这个密码非常重要)名字与姓氏:192.168.0.110(以后访问的域名或IP地址,非常重要,证书和域名或IP绑定)组织单位名称:anything(随便填)组织名称:anything(随便填)城市:anything(随便填)省市自治区:anything(随便填)国家地区代码:anything(随便填)
② Application certificate to Tomcat

Open the Tomcat configuration file conf\server.xml .

Uncomment and add two properties keystoreFile keystorePass .

<connector port=" 8443 "protocol=  "http/1.1" sslenabled= "true" Span class= "Hljs-attribute" >maxthreads= "scheme=  "https" secure= "true" clientauth=" false "sslprotocol= "TLS" keystorefile= "E:/tomcat.keystore" Span class= "Hljs-attribute" >keystorepass= "123456"/>       

Where Keystorefile is the certificate file address generated in the previous step, Keystorepass is the KeyStore password in the previous step.

Tomcat enables the HTTPS protocol configuration process

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.