Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The installation method of SSL Certificate under Tomcat

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

1. Import SSL certificate:

Import an intermediate certificate for a website (such as site: www.anxinssl.com): keytool-import-alias intermediate-keystore c:\ server.jks-chinasslcrt-file c:\ intermediate.crt prompts "Authentication has been added to keystore" and the import is successful.

Import cross-certificate: keytool-import-alias cross-keystore c:\ server.jks-chinasslcrt-file c:\ chain.crt prompts "authentication has been added to keystore" and the import is successful.

Import server SSL certificate: keytool-import-alias mykey-keystore c:\ server.jks-chinasslcrt-file c:\ server.crt enter the password and prompt: "Authentication reply has been installed in keystore" indicates that the import is successful.

Modify the configuration file server.xml, copy the server.jks file that has been correctly imported into the authentication reply to the conf directory under the tomcat installation directory, open Server.xml with a text editor and update the following:

MaxThreads= "150" SSLEnabled= "true" scheme= "https" secure= "true"

ClientAuth= "false" sslProtocol= "TLS" keystoreFile= "D:/jcy/Tomcat7/conf/server.jks"? keystorePass= "123456" / >

The following is a description of the configuration file parameters: port= "443" SSL access port number is 443 keystoreFile private KeyStore file server.jks keystorePass private KeyStore password 123456

For the Tomcat server, if you need to support https access, you can configure the server.xml file and open the https access method after the server certificate is generated. But sometimes, we may need to restrict the access of the whole site or some specific URL to only using https mode, so we need to make further configuration in the web.xml file of the WEB application. Add the following code after tomcat / conf/web.xml:

Tomcat needs to be restarted, with the following command:

Service tomcat stop

Service tomcat start

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report