DEV Community

Shrawan
Shrawan

Posted on • Originally published at shrawanx.com

SSL with certbot on nginx/apache on Ubuntu Server

First Thing first

sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
Enter fullscreen mode Exit fullscreen mode

On Nginx Server

sudo apt-get install python3-certbot-nginx
sudo certbot --nginx
Enter fullscreen mode Exit fullscreen mode

On Apache Server

sudo apt-get install python3-certbot-apache
sudo certbot --apache
Enter fullscreen mode Exit fullscreen mode

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

Top comments (0)