Hey guys in this article I will show you How To install ssl on digital ocean so let get started.
Table of Contents
Introduction
Lets talk about is ssl mean secure sockets layer Protocol for web browsers and servers that allows for the authentication, encryption and decryption of data sent over the Internet. How to Know ssl installed on site show in your browser and see https connection its mean ssl installed on website.
Lets Install free ssl certificate on digital ocean which is came from Lets encrypt.
Step1. Configure Virtual Host
First Create your virtual host on digital ocean droplet and add your domain go to this Click Here If already done skip it.
Step2. Installing Certbot
Add certbot repository in server
$ sudo add-apt-repository ppa:certbot/certbot
Now if add cerbot repository in your server lets install cerbot
$ sudo apt install python-certbot-apache
Also Read: Install Lamp On Digitalocean
Step3. Configure Firewall
If you use firewall you need change some rules
First check your firewall status by typing command below
$ sudo ufw status
You see not allow https we need to allow https and apache full and delete the apache by typing this command.
$ sudo ufw allow ‘Apache Full’
$ sudo ufw delete allow ‘Apache’
After config firewall lets install certificate
Step4. Installing Certificate
$ sudo certbot –apache -d your_domain -d www.your_domain
He asked for force redirect on https or not type 1 if not type 2 because recommend this fuction is used for if anybody go to http he automatically redirect to https.
Step5. Renew Certificate
Letsencrypt provide 3 months ssl certificate after 3 months you need to renew your ssl until yoir website has been down very simple setup if you want to renew.
How to see next renew date go to your browser and click on https and click Details and certificate information in expiry on your certificate expiry date.
$ sudo certbot renew –dry-run
Thats solve your setup installed succesfully and dont forget to renew your certificate.
Learn More: Click Here
If you have any doubt or suggestion leave comment or contact to contact@tipsntricks.in
Leave a Reply