ProblemHow to backup and export a certificate from Apache.ResolutionIn some instances, you may want to move a certificate from one server to another. You may also want to back up the certificate that you have installed. Depending on where you are moving your certificate to, the type of file you want will vary.Note: This guide contains a high level approach to backing up and exporting a certificate. For a more in-depth view on installing a certificate onto Apache or IIS, please search the QuoVadis Knowledge Base for the appropriate articles.Backing Up The SSL CertificateApache stores both the SSL certificate and its private key as two separate files. The location of these files are referenced in your configuration.
Open your configuration file and look for the following:SSLCertificateFile /.crtSSLCertificateKeyFile /.keyNavigate to both paths and copy both the.crt and.key file in a secure location.Migrating an Apache Certificate to Microsoft IIS.The easiest way to install a certificate onto IIS where the private key and matching public key has already been created is to create a.pfx file. A.pfx (may also be called a.p12 file) is a file that contains both your public and private keys merged together.As Apache contains both of your keys as two separate files, you must merge them together to make a.pfx (or.p12) file. The easiest way to do this is to obtain both files and use a command in OpenSSL to do this. The following command is:openssl pkcs12 -export -out mycertificate.pfx -inkey privateKey.key -in certificate.crtNote: All fields that are underlined in the above command are variables and can change depending on the name of your files. QuoVadis Trust/Link provides managed digital certificate services for enterprises and governments.
QuoVadis identity services include Public Key Infrastructure (PKI); Digital Certificates for authentication, encryption, and digital signature; SSL Certificates and Extended Validation SSL for websites; Time-stamping; and Root Signing for internal PKI. QuoVadis is a Qualified Certification Services Provider (CSP) in Switzerland, the Netherlands, Belgium, and Bermuda and holds the WebTrust seal. The QuoVadis Root Certificates are trusted in major browsers and operating systems.
I am a developer. Our server admins have given me 3 files.cer,.pfx and.p7b and told me to install SSL in Apache Server. I have Wamp with Apache version 2.4.9. I have search and found something. I open httpd.conf file and search for DocumentRoot. After DocumentRoot I have added, DocumentRoot 'c:/wamp/www/'SSLEngine onSSLCertificateFile C:/Path/MyCer.cerSSLCertificateKeyFile C:/Path/MyPfx.pfxSSLCACertificateFile C:/Path/MyP7b.p7bNow when I restart the apache.
I am unable to navigate the server even on http. When I comment the above lines, my sites works on http. Although this is not exactly a 'question', and you do not specify what is inside your files, you're doing at least one thing wrong: a pfx file (assuming this is not a naming error) cannot be used directly as a 'key' in Apache. Without knowing the contents of the cer and the p7b file, let's assume that the pfx has all the info we need and that you have the pfx password (you do, right?), and start from there.Grab and install OpenSSL for Windows (Suggestion: has precompiled binaries if you're not willing to build from sources in ).Extract the different files required for Apache from the pfx (you'll be prompted for the pfx password when required):a. Extract the SSL Certificate Private Key (Encrypted) from the pfxC:Path openssl pkcs12 -in MyPfx.pfx -nocerts -nodes -out MyEncKey.keyb. Remove the encryption from the SSL Certificate Private KeyC:Path openssl rsa -in MyEncKey.key -out MyKey.keyc.
Extract SSL Certificate from the pfxC:Path openssl pkcs12 -in MyPfx.pfx -clcerts -nokeys -out MyCert.cerd. Extract the (possibly empty) CA Certificate Chain from the pfxC:Path openssl pkcs12 -in MyPfx.pfx -nodes -nokeys -cacerts -out MyCAs.crt.Rebuild your httpd.conf using these lines instead of yours (note: ONLY INCLUDE THE SSLCACertificateFile line if the MyCAs.crt is not empty; you can check it with any text editor)SSLCertificateFile C:/Path/MyCert.cerSSLCertificateKeyFile C:/Path/MyKey.keySSLCACertificateFile C:/Path/MyCAs.crt.