Ask a Question

Solution ID : SO5945

Last Modified : 05/02/2018

How to move an SSL certificate from Apache to Apache?

Solution


To move an SSL certificate from one Apache server to another Apache server, please follow the steps below.

Step 1:
  Locate the Private Key, CA Certificate and Certificate files

               The following directives in the httpd.conf or ssl.conf point to the location of the Key, CA Certificates and Certificate files:

SSLCertificateFile ... /path/to/mycertfile.crt

SSLCACertificateFile … /path/to/intermediate.crt

SSLCertificateKeyFile ... /path/to/mykeyfile.key

NOTE: Depending on the version of Apache, the directive for the intermediates might be SSLCACertificateFile or SSLCertificateChainFile.

 
Step 2: Copy the Private Key, CA Certificates and Certificate and move them to the corresponding locations on the new Apache server.

SSLCertificateFile ... /path/to/mycertfile.crt

SSLCACertificateFile … /path/to/intermediate.crt

SSLCertificateKeyFile ... /path/to/mykeyfile.key

NOTE:  Some instances of Apache contain both a httpd.conf and ssl.conf file. Please enter or amend the httpd.conf or the ssl.conf with the above directives. Do not enter both as there will be a conflict and Apache may not start.
 
 
Step 3: Save the httpd.conf/ssl.conf file and restart Apache

              This can be done by using the apachectl script:  
 
apachectl stop  

apachectl startssl