Want to install SSL certificate on Apache CentOS? Follow this steps-by-step guide to install SSL easily.
The CentOS Linux distribution is a steady, convenient, and consistent platform obtained from the sources of Red Hat Enterprise Linux (RHEL). The CentOS project is modeled on the structure of Apache foundation. If you have an Apache CentOS server and want to install SSL, then this article will help you very much.
- After receiving an SSL certificate from the certificate authority, download the primary and intermediate certificate.
- Copy your SSL certificate files to your Apache server. You should have a key file on the server-generated with your CSR (certificate signing request).
- Find httpd.conf or ssl.conf file presented in the Apache configuration. To edit these files you can use the following commands:
# cp /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.BAK # nano /etc/httpd/conf.d/ssl.conf
- If one or more file is explained, then remove the # character from the line and set the value of directives to the absolute path based on Apache version.
Apache Version < 2.4.8 Directives Path to Enter SSLCertificate File Certificate file path SSLCertificate KeyFile Key file path SSLCertificate ChainFile Intermediate bundle path Apache Version 2.4.8 + Directives Path to Enter SSLCertificate File Certificate file path SSLCertificate KeyFile Key file path SSLCertificate Path Intermediate bundle path
- You can add the absolute path to each directive, as shown in below examples:
SSLCertificateFile /etc/httpd/conf/ssl.crt/your_leaf_certificate.crt SSLCertificateKeyFile /etc/httpd/conf/ssl.key/your_domain_name.key SSLCACertificatePath /etc/httpd/conf/ssl.chain/your_intermediate_chain.crt
- Now save your configuration file and restart Apache.
Your SSL certificate is installed on CentOS. You can use our SSL installation checker that will help you to diagnose issues.