certbot is a free CLI tool to issue certificates to secure the connection between the VPS and people who are viewing the web pages.
In the following commands, I will assume you are using Debian with nginx webserver.
sudo apt install python3-certbot-nginx
to enable HTTPS support on web pages, run:
sudo certbot --nginx
It will print all domains that configured in nginx, so first you need to add server block in nginx and make sure it works over http://
Because certbot issue certificates valid only for 3 months, you need to re-run same command each 3 months but because we forget, we will setup a cronjob, Run:
0 0 1 * * sudo certbot --nginx renew
or run crontab with sudo if your sudo command prompts you for password each time