The workflow is as follows:
sudo apt update
sudo apt install nginx
sudo systemctl start nginx
sudo systemctl enable nginx
/etc/nginx/conf.d/
server {
listen 80;
listen [::]:80;
server_name example.com;
location / {
proxy_pass http://localhost:3000/;
proxy_buffering off;
}
}
sudo nginx -t
sudo nginx -s reload
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx
sudo certbot --nginx
0 0 1 1,3,5,7,9,11 1 certbot renew --quiet
5 0 1 1,3,5,7,9,11 1 service nginx reload