How to install Free SSL on Ubuntu Apache/Nginx using certbot?
1. Update repository for certbot installation
# sudo add-apt-repository ppa:certbot/certbot
2. Install certbot package for Apache/Nginx
# apt install python-certbot-apache //For Apache Webserver
# apt install python-certbot-nginx //For Nginx webserver
3. Check whether you have working virtual host configuration file of Apache/Nginx. Also check whether A records are updated and pointed to the server where you are installing SSL. If A record is not updated, SSL will not be installed.
# apache2ctl configtest //To check apache configuration
# nginx -t //To check Nginx configuration
4. Once step 3 is confirmed, run below command
# certbot –apache //For apache webserver
# certbot –nginx //For Nginx webserver
Provide email ID on which you will receive SSL expiration notifications. Also, set automatic redirection which is a good practice.