Knowledgebase:
Moving SSL Certificates from IIS to Apache
Posted by Joseph Quintero on 10 May 2013 12:27 PM

Export your IIS certificate into a .pfx file.

  • Run mmc.exe
  • Click the 'Console' menu and then click 'Add/Remove Snap-in'.
  • Click the 'Add' button and then choose the 'certificates' snap-in and click on 'Add'.
  • Select 'Computer Account' then click 'Next'.
  • Select 'Local Computer' and then click 'OK'.
  • Click 'Close' and then click 'OK'.
  • Expand the menu for 'Certificates' and click on the 'Personal' folder.
  • Right click on the certificate that you want to export and select 'All tasks' -> 'Export'.
  • A wizard will appear.  Make sure you check the box to include the private key and continue through with this wizard until you have a .pfx file.

 

Next, run OpenSSL to extract the private key and the certificate file.


1. Open up a command prompt with [Start] -> [Run] -> ‘cmd’


2. Within the command line, navigate to the Apache2.2\bin directory:

C:\>cd C:\Apache2.2\bin\

 

3. Launch the openssl application.

C:\Apache2.2\bin\>openssl

 

4. Export the private key file from the pfx file.

OpenSSL> pkcs12 -in filename.pfx -nocerts -out key.pem

 

5. Export the certificate file from the pfx file.

OpenSSL> pkcs12 -in filename.pfx -clcerts -nokeys -out cert.pem

 

6. This removes the passphrase from the private key, so Apache won't prompt you for your passphase when it starts.

OpenSSL> rsa -in key.pem -out server.key

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).