Project Description
This project was a continuation of the previous project with the implementation of a load balancer and a registered domain name registered with SSL certificate, as shown in the project diagram;
Project Steps :
- spin up a virtual machine in AWS running Ubuntu version 20.04 LTS
- update /etc/hosts with webservers IP4 address from previous project
- installing nginx
- sudo yum install nginx -y
- confirming nginx is running
- Editing the hosts file
- Updating nginx config file
- sudo vi /etc/nginx/nginx.conf
- Registering domain with godaddy.com and updating the name server with A-record of Route53
-
Assigning an Elastic IP address with nginx load balancer and associating it to the created domain name so it remains upon reboot
-
updating nginx configuration file with domain
- Ensuring snapd service is running and Installing Certbot
- sudo systemctl status snapd
- sudo snap install --classic certbot
- requesting a certificate
- sudo ln -s /snap/bin/certbot /usr/bin/certbot
- sudo certbot --nginx
- Site registered with SSL certificate port 443 opened in security group of load balancer
- Renewing Certificate using dry-run
- sudo certbot renew --dry-run
- Scheduling a cron job to automatically renew the licence of the certificate
-
crontab -e
-
updating the file with the command to renew certificates twice a day
-
- */12 * * * root /usr/bin/certbot renew > /dev/null 2>&1