Home » Apache, Linux Administration, Open Source, Windows Administration

Convert IIS ssl certificate to use in Apache

8 August 2007 2 Comments


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: , , , ,

2 Comments »

  • g said:

    Just Awesome thank you !

  • Jay said:

    Your guide was outstanding, I used it to migrate a certificate from IIS 7.5 to Apache. Thank you very much!

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.