Convert the SSL certificate for IIS to an SSL certificate available under Apache

Source: Internet
Author: User
Tags openssl openssl rsa openssl x509 pkcs12 ssl certificate pfx file


Recently in a project, the project was previously used. NET do, now need to rewrite with PHP. After development, you need to migrate the SSL certificate on IIS to the Apache environment.

Workaround:

Roughly three steps

First, export the certificate file to IIS

1. Start-> Run->mmc

2. Menu-> file-> Add/Remove snap-in

3. Select the certificate entry and add

4. In the wizard, select the computer account .... Detailed steps are not mentioned.

5. Output a password when exporting, Note: This password is useful when generating key and cert under Apache.


Two, under Apache use OpenSSL pkcs12 to extract the key and cert files from the exported PFX file

1. Copy the exported PFX file into Apache OpenSSL to avoid path problems caused by environment variables not set

2. Enter the cmd window and enter the following instructions

OpenSSL pkcs12-in xxx.pfx-nodes-out xxx.pem 

OpenSSL rsa-in xxx.pem-out xxx.key OpenSSL x509-in xxx.pem-out

Xxx.crt


In the Apache configuration file, use the following instructions to install the

Sslcertificatefile "XXX.CRT"
sslcertificatekeyfile "Xxx.key"




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.