About the Tomcat is configured as an HTTPS server

xiaoxiao2021-03-06  85

The problem with the username password requested in Project has been resolved. By configuring Tomcat to an HTTPS server, this ensures that the entire socket between Client and Server is encrypted, the specific configuration is as follows: (for JDK 1.4.x)

First generation certificates:

Go to the command line, put the current directory CD to% Tomcat_HOME%,

Execute command:% java_home% / bin / keytool -genkey -alias tomcat -keyalg rsa-readystore server.keystore

Then follow the prompt of the command line, it is required to enter some information, think you have a certificate.

Note: Two passwords will be entered twice during the process of certificates, Tomcat requires these two passwords to be consistent

After completing, there is a file of a server.keystore under Tomcat_home.

Secondly configure Tomcat to support HTTPS

Open Tomcat_Home / Con / Server.xml

Find a next piece:

<-! Define a SSL Coyote HTTP / 1.1 Connector on port 8443 -> <-!

->

Change it to:

<-! Define a SSL Coyote HTTP / 1.1 Connector on port 8443 ->

Among them, server.keystore just generated files, and xxxxxxx is the password you entered when you have a certificate.

Save server.xml to restart tomcat

转载请注明原文地址:https://www.9cbs.com/read-95025.html

New Post(0)