Tomcat replaces HTTP with HTTPS

zhaozj2021-02-16  90

Tomcat replaces HTTP method for HTTPS Tips 1685

Unknown

[中文 JAVA Technology Network 2004-05-22]

Tomcat replaces HTTP with HTTPS

1. First create a certificate KeyStore with a tool keytore with JDK

Java_home / bin / keytool -genkey -alias tomcat -keyalg rsa / -keystore / path / to / my / keystore

2. If you are JAVA Secure Socket Extensions (JSSE), Version 1.0.2 or Later, and JAVA_HAR, JNET.JAR, JAVA_HOME / JRE / LIB / EXT If it is JDK1.4.x already there is already these packages.

3. Modify the server.xml file tomcat directory, increase & Lt; Connector className = "org.apache.catalina.connector.http.HttpConnector" port = "8443" minProcessors = "5" maxProcessors = "75" enableLookups = "true "acceptCount =" 10 "debug =" 0 "scheme =" https "secure =" true "> & Lt; Factory className =" org.apache.catalina.net.SSLServerSocketFactory "clientAuth =" false "keystoreFile =" / path / to / my / keystore "KeyStorePass =" Runway "protocol =" tls "/> & lt; / connector>

The value of the keystorepass is the password entered when generating the keystore.

Restart Tomcat, you can use HTTPS.

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

New Post(0)