In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the method of configuring Https/ssl certificate for Tomcat, which has a certain reference value, and interested friends can refer to it. I hope you can learn a lot after reading this article.
Create a certificate
Keytool-genkeypair-alias "tomcat"-keyalg "RSA"-keystore "localhost-rsa.jks"
Feel free to enter the following information, and what I enter here is:
Enter keystore password: Re-enter new password: What is your first and last name? [Unknown]: pichWhat is the name of your organizational unit? [Unknown]: pichWhat is the name of your organization? [Unknown]: tomcatWhat is the name of your City or Locality? [Unknown]: beijingWhat is the name of your State or Province? [Unknown]: beijingWhat is the two-letter country code for this unit? [Unknown]: cnIs CN=pich, OU=pich, O=tomcat, L=beijing, ST=beijing, C=cn correct? [no]: yEnter key password for (RETURN if same as keystore password): Re-enter new password:
This creates a localhost-rsa.jks file in the current directory. The password is 123456 and the alias is tomcat.
Configure a certificate for Tomcat
First, copy the localhost-rsa.jks file generated above to the conf directory of Tomcat, then open the server.xml file under that directory, and find the following code, which was originally a comment. Now you need to open the comment and change it to the following:
Then restart Tomcat and access https://localhost:8443/
You can see the following page:
You can see that the address bar is displayed as unsafe. Because this certificate is made by ourselves, the browser does not trust him by default, of course you can trust him manually. 12306 that's pretty much how their certificates are made.
Thank you for reading this article carefully. I hope the article "how to configure Https/ssl Certificate for Tomcat" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.