Hello everyone in this quick tutorial we wanted to take you through how to setup a free ssl certificate with LetsEncrypt.
First please follow our Lightsail tutorial here https://www.youtube.com/watch?v=TZLfG7T2tx4.
Step One: SSH into your instance and run.
sudo su
wget -O bncert-linux-x64.run https://downloads.bitnami.com/files/bncert/latest/bncert-linux-x64.run
mkdir /opt/bitnami/bncert
mv bncert-linux-x64.run /opt/bitnami/bncert/
chmod +x /opt/bitnami/bncert/bncert-linux-x64.run
ln -s /opt/bitnami/bncert/bncert-linux-x64.run /opt/bitnami/bncert-tool
No we can run the tool!
/opt/bitnami/bncert-tool
Here are some option we set yours maybe different.
Enable HTTP to HTTPS redirection [Y/n]: y
Enable non-www to www redirection [Y/n]: n
Enable www to non-www redirection [y/N]: y
Changes to perform
The following changes will be performed to your Bitnami installation:
1. Stop web server
2. Configure web server to use an existing Let's Encrypt certificate and renew:
/opt/bitnami/letsencrypt/certificates/example.tv.crt
3. Configure a cron job to automatically renew the certificate each month
4. Configure web server name to: otnet.tv
5. Enable HTTP to HTTPS redirection (example: redirect http://example.tv to
https://example.tv)
6. Enable www to non-www redirection (example: redirect www.otnet.tv to
otnet.tv)
7. Start web server once all changes have been performed
Create a free HTTPS certificate with Let's Encrypt
Please provide a valid e-mail address for which to associate your Let's Encrypt
certificate.
Domain list: example.tv www.example.tv
Server name: example.tv
E-mail address []: support@example.tv
The Let's Encrypt Subscriber Agreement can be found at:
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf
Do you agree to the Let's Encrypt Subscriber Agreement? [Y/n]: y
Success
The Bitnami HTTPS Configuration Tool succeeded in modifying your installation.
The configuration report is shown below.
Backup files:
* /opt/bitnami/apache2/conf/httpd.conf.back.201912152319
* /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf.back.201912152319
* /opt/bitnami/apache2/conf/bitnami/bitnami.conf.back.201912152319
Find more details in the log file:
/tmp/bncert-201912152319.log
If you find any issues, please check Bitnami Support forums at:
https://community.bitnami.com
Manually Updating Renewing Existing Certificate
Just run the command again you will see the following output and you can run through the processes again.
Warning: A certificate for the list of domains you entered already exists. It
will be used instead of generating a new one.
Press [Enter] to continue:
Remove WordPress banner on Lightsail
sudo /opt/bitnami/apps/wordpress/bnconfig --disable_banner 1