Resin Configure SSL Description

Source: Internet
Author: User
Tags openssl

Resin Configure SSL Description


Daan











1.0











2004-12-22


























Description











There are several ways to configure SSL access for resin servers [1]:

1. Use OpenSSL under UNIX. (http://www.openssl.org/)

2. Use Sun's Jsse. (Http://java.sun.com/products/jsse)

3...

Here we introduce the second method, which is implemented under Windows 2000.













Preparatory work:

1. Windows Server.

2. J2sdk 1.4.x. (already included in the Jsse)

3. Resin 2.1.x.

4. Keytool usage in Jsse [2].













Steps:

1. Create a server certificate

A The following is how to use Sun's keytool to generate a server certificate. Look at the picture below:







Generally, the KeyStore password and the MyKey master password should be set to the same.

At this point, the certificate file has been saved in this example C:\resin-2.1.11\keys Erver.keystore

2. Configure Resin (resin.conf)

The resin SSL configuration needs to be extended to
<caucho.com>

<security-provider id= ' Com.sun.net.ssl.internal.ssl.Provider '/>













<!--declare a new HTTP server on port 443 (standard port for HTTPS),











-With SSL enabled-->














<app-dir>doc</app-dir>



<!--the HTTP port-->




<!--the Srun port, read by both JVM and plugin-->

<srun host= ' localhost ' port= ' 6802 '/>














<ssl>true</ssl>











<key-store-file>keys/server.keystore</key-store-file>











<key-store-password>YourPasswordHere</key-store-password>
























Test:

Using the above configuration, start the resin service, we can access https://localhost.

One of the quickest ways to test this is to create a new JSP file that reads as follows and access him:

Secure? <%= request.issecure ()%>













Run/bin/httpd.exe, the result is as follows:



To access https://localhost/, jump out of a security alert and choose Yes.



(If you don't want to jump out of this security alert, there are a few things to do: 1 Install the certificate to IE in the client; the CN (that is, first and last name) of the 2 certificate generation must use the server's machine name, or DNS name. )













Browser browsing https://localhost/, the effect is as follows:



Browse https://localhost/isSecure.jsp Test Files



This means that we configured resin to use SSL successfully.

Resources:

[1] SSL CONFIGURATION:HTTP://LOCALHOST/REF/SSL-QUICK.XTP

and SSL with RESIN:HTTP://WWW.CAUCHO.COM/RESIN-3.0/SECURITY/SSL.XTP

[2] The function and use of Java Keytool tools: http://www.ccw.com.cn/htm/center/prog/02_7_8_4.asp


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.