After watching the below video about HTTPS, I decided to finally make the move over to SSL. Fortunately, there’s a free way of doing so by using Let’s Encrypt. I’m going to provide the exact steps I took, which really wasn’t hard at all. Let’s get to it.
- https://letsencrypt.org/ # Let’s Encrypt is a new Certificate Authority
- https://community.letsencrypt.org/ # Let’s Encrypt community
- https://certbot.eff.org/ # certbot is a Let’s Encrypt Client
OS: CentOS release 6.8 (Final)
Web Application: httpd – Server version: Apache/2.2.15 (Unix)
Run the following commands as root.
yum install epel-release
chmod a+x certbot-auto
I created a separate conf file within /etc/httpd/conf.d/ (removed the old one within /etc/httpd/conf/httpd.conf).
Notice I added a redirect for all http requests to be forwarded to https.
DirectoryIndex index.html index.php
Setup auto renewal using cron
Runs renew command every 6 hours.
*/6 * * * * scl enable python27 '/root/certbot-auto renew'
Congratulations! You’ve made your website secure.