Installing a ‘RapidSSL’ SSL Certificate on CentOS 6
Generating the SSL
- Make sure openssl is installed on the server
yum install openssl - Create an SSL directory to store all SSL files
mkdir /etc/httpd/ssl - Put your “yourdomain.crt” to /etc/httpd/ssl
- Put your Intermediate Certificate Advisory “intermediate.crt” to /etc/httpd/ssl
- Generate the key for the SSL certificate
openssl genrsa –des3 –out yourdomain.tld.key 2048 - Generate the csr for the SSL certificate
openssl req –new –key youdomain.tld.key –out yourdomain.tld.csr
Configure Apache for the SSL
- Make sure mod_ssl is installed
yum install mod_ssl - Add the following to /etc/httpd/conf/httpd.conf
NameVirtualHost *:443 - 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>
