Convert IIS ssl certificate to use in Apache

Last time I did this, I found the instructions pretty easily on how to migrate SSL’s from IIS to Apache. This time I found it hard to locate the documentation, so for my own lack of memory and when google fails you, here it is:

First we need to export the certificate from IIS into a pfx file. To do that:
Click Start->Run->type: mmc [enter]
Click ->’Console’ -> ‘Add/Remove Snap-in’.
Click -> ‘Add’ -> ‘certificates’ snap-in and click on ‘Add’.
Select -> ‘Computer Account’ -> click ‘Next’.
Select ‘Local Computer’ and then click ‘OK’.
Click ‘Close’ and then click ‘OK’.

In the menu for ‘Certificates’ and click on the ‘Personal’ folder.

Choose your certificate to export and select ‘All tasks’ -> ‘Export’.
In the wizard, check the box to include the private key, continue until you have a .PFX file.

Move the Certificate to the machine Running Apache:

Now, we are going to use openssl to extract the private key, and the cert file.

# Export the private key from the pfx file
openssl pkcs12 -in iis.pfx -nocerts -out apache.key.pem
# Export the certificate file from the pfx file
openssl pkcs12 -in iis.pfx -clcerts -nokeys -out apache.cert.pem
# ****This removes the passphrase from the private key so Apache won’t
# ****prompt you for your passphase when it starts
openssl rsa -in apache.key.pem -out apache.key

Technorati Tags: , , , ,

Published by salubrium

I am a Systems Administrator based in Sydney, Australia with some hugely varied interests: Topics covered are Virtualization, Web Hosting, Remote Desktop, Security and Backups, PHP, Python, MVC Frameworks, SEO

Leave a comment

Your email address will not be published. Required fields are marked *