Intro
I am installing a SSL cert for Apache2 and I thought I would document it. I have done it so many times now and kinda feel like its about time to have a place to go to to get the details quickly. I am using a domain level cert because its cheap and will provide encryption without having to verify my "business" (there isnt one yet). The cert I am using for this is Comodo's positivessl cert from Namecheap.com that costs 9.99
Apache2 + mod_ssl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#make sure the module is not there yet | |
/usr/sbin/apachectl -t -D DUMP_MODULES | |
#install ssl | |
sudo yum install openssl-devel | |
#get and build apache 2 based on your version | |
cd src | |
/usr/sbin/apachectl -v | |
wget http://www.eng.lsu.edu/mirrors/apache//httpd/httpd-2.2.27.tar.gz | |
tar xvfz httpd-2.2.27.tar.gz | |
cd httpd-2.2.27 | |
./configure --enable-ssl --enable-so | |
make | |
sudo make install |
Configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost gitpatron.com:443> | |
ServerAdmin admin@gitpatron.com | |
ServerName gitpatron.com | |
SSLEngine on | |
SSLCertificateKeyFile /etc/ssl/certs/gitpatron.key | |
SSLCertificateFile /etc/ssl/certs/gitpatron_com.crt | |
SSLCertificateChainFile /etc/ssl/certs/gitpatron_com.ca-bundle | |
</VirtualHost> |