To install an SSL certificate on your DigitalOcean droplet running Apache, follow these steps:
- Obtain an SSL certificate from a trusted certificate authority (CA). You can purchase an SSL certificate from a CA or use a free SSL certificate provider such as Let’s Encrypt.
- SSH into your droplet using your preferred SSH client.
- Install the Certbot tool on your droplet by running the following command:
sudo apt-get update
sudo apt-get install certbot python3-certbot-apache
- Run the following command to obtain an SSL certificate:
sudo certbot --apache
This will start the Certbot tool and guide you through the process of obtaining and installing an SSL certificate. Follow the prompts and provide the requested information.
- Once the SSL certificate has been installed, verify that your website is now accessible over HTTPS.
That’s it! Your DigitalOcean droplet running Apache now has an SSL certificate installed and your website is secure over HTTPS.