Created
October 6, 2018 18:47
-
-
Save manishjaingit/3d554cf1f3e536f6026a40f0a5b3bf83 to your computer and use it in GitHub Desktop.
setup lets encrypt in Ubuntu 16.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### To apply ssl certificate free via lets encrypt. ### | |
Step 1 | |
sudo add-apt-repository ppa:certbot/certbot | |
sudo apt-get update | |
sudo apt-get install python-certbot-nginx | |
sudo nano /etc/nginx/sites-available/default | |
# change serverName yourdomainname.com | |
sudo systemctl reload nginx | |
sudo ufw allow 'Nginx Full' | |
sudo ufw delete allow 'Nginx HTTP' | |
sudo ufw status | |
# if show inactive | |
sudo ufw enable | |
sudo certbot --nginx -d lmsindia.xyz -d www.lmsindia.xyz | |
# give some question answer and then run below command to renew the ssl. | |
sudo certbot renew --dry-run |
sudo apt-get install python-certbot-nginx
please make sure by running this command because it got replace by sudo apt-get install python3-certbot-nginx
sudo ufw allow ssh
sudo ufw allow 443/tcp
After successfully installation of ssl certificate make sure to comment the #port80 line in ssl server block, which creates after the ssl
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://askubuntu.com/a/541687