Follow us on Twitter
Home Blogs Linux How to Import SSL Key from IIS to Apache Webserver

PostHeaderIcon How to Import SSL Key from IIS to Apache Webserver

Exporting the Private key and Public Key from IIS

Usually when a SSL key is being backed up you will have both private key and public key exported as one key with a .pfx extension. We may need to separate them in case we are going to change the Web server from IIS to apache.

Extracting the Private key and Cert file using openssl command

  • Step 1: Exporting the private key file from the pfx file

    openssl pkcs12 -in filename.pfx -nocerts -out key.pem

    where filename.pfx is the filename of the .pfx file that you explorted from IIS.

  • Step 2: Exporting the certificate file from the pfx file

    openssl pkcs12 -in filename.pfx -clcerts -nokeys -out cert.pem


  • Step 3: Removing the passphrase from the private key so that you will not be prompted for passphrase when Apache is started.

    openssl rsa -in key.pem -out server.key
Share/Save/Bookmark
Comments (1)
  • Raja  - Very technical
    Hai this was really useful...

    Thankyou so much... :D
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:):(:0:shock::confused:8):lol::x:P:oops::cry:
:evil::twisted::roll::wink::!::?::idea::arrow:
Security
Please input the anti-spam code that you can read in the image.