How to Install SSL Certificate on Apache CentOS

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.

cheapest ssl certificate
  1. After receiving an SSL certificate from the certificate authority, download the primary and intermediate certificate.
  2. 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).
  3. 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
    
  4. 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
  5. 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
    
  6. 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.

About the Author

Nikita Gupta

Nikita Gupta is a seasoned professional with a master's degree in Computer Applications. She brings over 10 years of profound experience to the realm of technology. Her exceptional expertise spans software security, data security, and mastery in SSL/TLS. When it comes to cutting-edge solutions for securing digital assets, Nikita is a dedicated pro.

Trusted by Millions

SSL2BUY delivers highly trusted security products from globally reputed top 5 Certificate Authorities. The digital certificates available in our store are trusted by millions – eCommerce, Enterprise, Government, Inc. 500, and more.
PayPal
Verizon
2Checkout
Lenovo
Forbes
Walmart
Dribbble
cPanel
Toyota
Pearson
The Guardian
SpaceX