Skip to content

Instantly share code, notes, and snippets.

@roggeo
Last active April 12, 2022 18:17
Show Gist options
  • Save roggeo/8eb4bb49579b8bd688739fd851a3fb23 to your computer and use it in GitHub Desktop.
Save roggeo/8eb4bb49579b8bd688739fd851a3fb23 to your computer and use it in GitHub Desktop.
SSL Https - Nginx on Ubuntu Focal

SSL Https - Nginx on Ubuntu Focal

1 - First add server_name in /etc/nginx/sites-available/default:

server_name yourdomain.com www.yourdomain.com;

2 - Installing Certificate SSL HTTPS:

sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot --nginx
# test
curl https://yourwebsite.com

More details: https://certbot.eff.org/instructions?ws=nginx&os=ubuntufocal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment