Enable HTTPS connections in Tomcat 5.5

Source: Internet
Author: User

1. First, use the built-in JDK tool keytool to generate a "server certificate"


Java_home/bin/keytool-genkey-alias tomcat-keyalg RSA-keystore C:/tomcat. Key
Enter the password. Use the default value of changeit in Tomcat.
Enter relevant information and confirm
Generate a digital certificate in pcks1.2 format in C:/tomcat. Key

2. if jdk1.3 or below, you need to download the Java securesocket extensions (JSSE) package (http://java.sun.com/products/jsse/), version 1.0.2or later, and. jar, jnet. jar, JSSE. copy jar to $ java_home/JRE/lib/EXT
If it is jdk1.4.x +, these packages are already available.
  
3. Modify the server. xml file in the Tomcat directory and add
  

<Connector Port = "8443" maxhttpheadersize = "8192"
Maxthreads = "150" minsparethreads = "25" maxsparethreads = "75"
Enablelookups = "false" disableuploadtimeout = "true"
Acceptcount = "100" Scheme = "HTTPS" secure = "true"
Clientauth = "false" keystorefile = "C:/tomcat. Key"
Keystorepass = "changeit" sslprotocol = "TLS"/>

4. Restart Tomcat and access https: // localhost: 8443/

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.