• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Securing VPS/Servers

SSL Certificates with Apache on CentOS 7

How VPS by How VPS
November 2, 2018
in Securing VPS/Servers, SSL Certificates
0
SSL Certificates with Apache on CentOS 7
0
SHARES
27
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Before You Begin
  2. Configure Apache to use the SSL Certificate
  3. Test Your Configuration
  4. More Information
    1. Join our Community

SSL Certificates with Apache on CentOS 7

SSL Certificates with Apache on CentOS 7

This guide will show you how to enable SSL to secure websites served through Apache on CentOS or Fedora.

Before You Begin

This guide assumes that you are running Apache2 on CentOS or Fedora. Prior to starting this guide, ensure that the following steps have been taken on your Linode:

  • Familiarize yourself with our Getting Started guide and complete the steps for setting your Linode’s hostname and timezone.

  • Complete our LAMP on CentOS 7 guide, and create a site that you wish to secure with SSL.

  • Follow our guide for obtaining either a self-signed or commercial SSL certificate.

  • In order to configure your Linode to function with SSL, you will need to ensure that the Apache mod_ssl module is installed on your system. You can do so by running the following command:

    yum install mod_ssl
    

Configure Apache to use the SSL Certificate

  1. Edit the virtual host entries in the /etc/httpd/conf.d/ssl.conf file to include the certificate files and virtual host information that should be used by each domain. For each virtual host, replicate the configuration shown below. Replace each mention of example.com with your own domain.

    If you’re using a commercially signed certificate and you’ve manually downloaded the root CA cert to /etc/pki/tls/certs, ensure that the SSLCACertificateFile value is configured to point to the root certificate directly. If the root certificate is being provided via the “ca-certificates” bundle, you can simply exclude the SSLCACertificateFile line.

    /etc/httpd/conf.d/ssl.conf
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    
    <VirtualHost *:443>
         SSLEngine On
         SSLCertificateFile /etc/pki/tls/certs/example.com.crt
         SSLCertificateKeyFile /etc/pki/tls/private/example.com.key
         SSLCACertificateFile /etc/pki/tls/certs/root-certificate.crt  #If using a self-signed certificate or a root certificate provided by ca-certificates, omit this line
    
         ServerAdmin info@example.com
         ServerName www.example.com
         DocumentRoot /var/www/example.com/public_html/
         ErrorLog /var/www/example.com/logs/error.log
         CustomLog /var/www/example.com/logs/access.log combined
    </VirtualHost>
  2. Restart Apache:

    systemctl restart httpd
    

You should now be able to visit your site with SSL enabled.

Test Your Configuration

Test your SSL configuration using the test page at your certificate issuer’s website, then perform a deep analysis through the Qualys SSL Labs SSL Server Test

More Information

You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

  • Apache HTTP Server Version 2.0 Documentation
  • Setting up an SSL Secured Webserver with CentOS

Join our Community

Find answers, ask questions, and help others.

This guide is published under a CC BY-ND 4.0 license.

Previous Post

How to Upgrade to Ubuntu 14.04 LTS

Next Post

How To Secure WordPress With the All In One Security Plugin

Next Post
How To Secure WordPress With the All In One Security Plugin

How To Secure Wordpress With the All In One Security Plugin

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet