Installing a ‘RapidSSL’ SSL Certificate on CentOS 6

Generating the SSL

  1. Make sure openssl is installed on the server
    yum install openssl
  2. Create an SSL directory to store all SSL files
    mkdir /etc/httpd/ssl
  3. Put your “yourdomain.crt” to /etc/httpd/ssl
  4. Put your Intermediate Certificate Advisory “intermediate.crt” to /etc/httpd/ssl
  5. Generate the key for the SSL certificate
    openssl genrsa –des3 –out yourdomain.tld.key 2048
  6. Generate the csr for the SSL certificate
    openssl req –new –key youdomain.tld.key –out yourdomain.tld.csr

Configure Apache for the SSL

  1. Make sure mod_ssl is installed
    yum install mod_ssl
  2. Add the following to /etc/httpd/conf/httpd.conf
    NameVirtualHost *:443
  3. Add a virtual host entry to /etc/httpd/conf/httpd.conf for port 443<VirtualHost *:443>
    SSLEngine On
    SSLProtocol all –SSLv2
    SSLCertificateFile /etc/httpd/ssl/mydomain.tld.crt

SSLCertificateKeyFile /etc/httpd/ssl/mydomain.tld.key
SSLCACertificateFile /etc/httpd/ssl/intermediate.crt

ServerName mydomain.tld
ServerAdmin webmaster@mydomain.tld
DocumentRoot /home/mydomain.tld/html/

ErrorLog “|/usr/sbin/rotatelogs /home/mydomain.tld/logs/error_log-%Y-%m-%d 86400″
CustomLog “|/usr/sbin/rotatelogs /home/mydomain.tld/logs/access_log-%Y-%m-%d 86400″ combined

<Directory “/home/mydomain.tld/html/”>
Order Allow,Deny
Allow from all
Options SymLinksIfOwnerMatch
AllowOverride AuthConfig Limit FileInfo
</Directory>
</VirtualHost>

Leave a Reply

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