If you have PFX certificate, you can convert this with OpenSSL to Apache compatible format.
PFX | PFX defines a file format commonly used to store private with accompanying public key certificates, protected with a password-based symmetric key (standard-PKCS12). |
PEM | Openssl usages PEM (Privacy Enhanced Mail Certificate) to store the private key. |
Follow the procedure below to extract separate certificate and private key files from the .pfx file. Openssl commandline-tool is required
Extract the certificate (the signed public key) |
|
Extract the private key |
|
Decrypts the key for use with Apache by removing the passphrase from the private key |
|
Extract the CA Certificate |
|
Convert PFX to PEM |
|
Convert PEM to PFX |
|
Creating .pfx file from certificate and private key
openssl pkcs12 -export -out your.domain.com.pfx -inkey private.key -in certificate.crt -certfile CACert.crt
Enable SSL
Now add the following directives to your SSL configuration to enable SSL on your site:
LoadModule ssl_module modules/mod_ssl.so
Listen 443
<VirtualHost *:443>
#…
SSLEngine on
SSLCertificateFile /path/to/cert.pem
SSLCertificateKeyFile /path/to/server.key
SSLCACertificateFile /path/to/domain-ca.pem
#…
<Location/>
SSLRequireSSL
</Location>
</VirtualHost>