APACHE SERVER – CSR AND CERTIFICATE INSTALLATION
Introduction: This article provides step-by-step instructions for installing your certificate in Apache HTTP Server.
Note: that as of version 2.4.8, the default configuration options have changed.
1. Copy certificate to your server.
This includes your server certificate, private key, and an intermediate certificate.
Your server certificate can be obtained from the delivery e-mail. Alternatively you can get it from your GlobalSign Account by clicking Edit on your order and copying the Certificate PEM Format text from the details.
The private key would have been generated along with the certificate signing request (CSR); it may very well already be on the server. If the private key is lost, you will need to reissue your certificate.
The intermediate certificate used will vary depending on product type. Click your product type in our intermediate certificate section to identify the correct cert.
2. Open your Apache configuration file for editing.
This will generally be found in one of the following locations, depending on your OS:
The configuration may be in different location. A detailed mapping of configuration paths can be found on the Apache Wiki.
3. Configure your virtual host to use the certificate.
4. Locate the virtual host for your site.
ServerName example.com www.example.com
5. Point the following directives to the corresponding certificate:
- SSLCertificateFile – This should point to your server certificate.
- SSLCertificateKeyFile – This should point to your server's private key.
- SSLCertificateChainFile – This should point to the intermediate certificate for your product.
Note: As of Apache 2.4.8, the SSLCertificateChainFile directive was deprecated and SSLCertificateFile was extended to support intermediate certificates. Adding the intermediate certificate to the end of your certificate will create a chain file for your server.
6. Test your updated configuration.
Depending on your system, run the command:
This will detect any errors in your configuration such as mismatched public & private keys, or an incorrect path.
- Restart the Apache service.
For older versions of Red Hat Enterprise Linux use init scripts as stated below:
service httpd restart
service apache2 restart
For Red Hat Enterprise Linux 7 or CentOS 7.0 use the following commands:
systemctl restart httpd.service
systemctl restart apache2.service
Note: Some Apache configurations may show an entry for SSLCACertificateFile. This field is only needed if you use Apache for client authentication. The SSLCACertificateFile would point to a CA certificate or directory of CA certificates that issue certificates you accept for client authentication.
Last Updated: July 25, 2017