DEV Community

Discussion on: Migrate from AWS EC2 to Lightsail

Collapse
 
david_j_eddy profile image
David J Eddy

Thank you Andre, glad you liked the article! Certbot should do the trick for you, it is how I do SSL on both Ubuntu 16/18, AMI (v2 does not work with cerbot w/o a LOT of work yet).

Send me a private message with your setup, may I can help.

Collapse
 
avasconcelos114 profile image
Andre Vasconcelos • Edited

Funny story went on here.

So I thought I had been setting up certbot wrong, as every time I tried testing if the page worked, the page would hang and the console would show its request status as pending.

What actually happened is that even though I opened up the ports in the server with sudo ufw allow 'Nginx Full', I hadn't set it up in the network tab on the lightsail screen. Going over to the Network options and adding the HTTPS option to the allowed ports fixed my issue!

Thank you once again as your article was the thing that finally made me want to fix the loadbalancer issue (and started saving me $18 every month!)

For reference, here's an image of the settings I had to add:

Thread Thread
 
david_j_eddy profile image
David J Eddy

:D Yea, Security Group's get me every time. Spent an hour recently trying to figure out why a site was return 504 Gateway Timeout. Turned out someone removed the SG's access to the RDS database. The language was timing out trying to connect to the DB so Nginx return 504.

Glad this helped out in some small way.