Setup LetsEncrypt#
We will go through the steps of setting up your own lets encrypt ssl Certificates
Before you start#
You will need a basoic web server with a fully qualified domain name setup. You will need a virtual host for each certificate, eg: shaunmegaw.co.za and git.shaunmegaw.co.za
Note
change shaunmegaw.co.za to your domain name
To set this up do the following
yum install httpd mod_ssl -y
vi /etc/httpd/conf.d/shaunmegaw.conf
<VirtualHost *:80>
DocumentRoot "/var/www/html/docs/site"
ServerName shaunmegaw.co.za
ServerAlias shaunmegaw.co.za
<Directory "/var/www/html/docs/site">
DirectoryIndex index.php index.html
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
systemctl restart httpd
systemctl enable httpd
Note
Repeat the virtual host setup for every sub domain as well
Setup LetsEncrypt#
Now we will go through the steps for creating a certificate
yum install epel-release
yum install httpd mod_ssl python-certbot-apache certbot jpeginfo -y
Note
each domain or subdomain is seperated by -d somename.domain.com
certbot --apache -d shaunmegaw.co.za -d wedding.shaunmegaw.co.za -d wiki.shaunmegaw.co.za
crontab -e
30 2 * * 1 /usr/bin/certbot renew >> /var/log/le-renew.log