Generate and Configure SSL with Nginx

Here are the steps to generate and configure ssl with nginx. You can use the command below to generate and configure the SSL certificate in nginx for specific domain and it will automatically generate code in your virtual host file.

sudo certbot --nginx -d domain.com -d www.domain.com