Shrawan Poudel
Shrawan's Blog

Shrawan's Blog

SSL with certbot on nginx/apache on Ubuntu Server

Shrawan Poudel
·Apr 25, 2022·

1 min read

Subscribe to my newsletter and never miss my upcoming articles

First Thing first

sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update

On Nginx Server

sudo apt-get install python3-certbot-nginx
sudo certbot --nginx

On Apache Server

sudo apt-get install python3-certbot-apache
sudo certbot --apache

Note [if using Cloudflare]: If you have used cloudflare as DNS hosting and have proxied your DNS record to this server, then automatic domain verification of while generating certificate will fail. In this case remove proxy from cloudflare DNS record and then try again else you can choose other methods for your domain verfication